Excel: Zahl in KB MB und GB umwandeln
Hallo,
Ich will das die Zahl in Excel z.B "131313" so ausehen "128.24 KB".
Ich habe schon die Formel hergestellt aber ich weiss nicht wie man die Greosse KB, MB und GB am ende der Zahl hinzufuegen kann.
Meine Formel ist:
=IF(1000>A1,TEXT(A1,"##0.00"),IF(1000000>A1,TEXT(F9/1024,"##0.00dasd"),
IF(1000000000>A1,TEXT(A1/1024/1024,"##0.00"),IF(1000000000000>A1,TEXT(F9/1024/1024/1024,"##0.00")))))
=IF(1000>A1,TEXT(A1,"##0.00"), ---------->Bytes
IF(1000000>A1,TEXT(A1/1024,"##0.00"), ---------->KB
IF(1000000000>A1,TEXT(A1/1024/1024,"##0.00"), ---------->MB
IF(1000000000000>A1,TEXT(A1/1024/1024/1024,"##0.00"))))) ---------->GB
Ich habe mit ,"##0.00\MB"), versucht aber es kommt diese fehler auf #VALUE!
Kann jemand mir helfen oder eine elegantere formel kennen?
Antwort schreiben
Antwort 1 von rainberg vom 28.07.2020, 08:14 Options
Hallo schroll,
so geht's:
=IF(1000>=A1,TEXT(A1,"##0,00")&" Bytes",IF(1000^2>=A1,TEXT(A1/1024,"##0,00")&" KB",IF(1000^3>=A1,TEXT(A1/1024^2,"##0,00")&" MB",IF(1000^4>=A1,TEXT(A1/1024^3,"##0,00")&" GB",IF(1000^5>=A1,TEXT(A1/1024^4,"##0,00")&" TB","")))))
Gruß
Rainer
Antwort 2 von rainberg vom 28.07.2020, 08:24 Options
Hallo schroll,
die Formel hatte noch einen Fehler, so sollte es passen:
=IF(1000>A1,TEXT(A1,"##0,000")&" Bytes",IF(1000^2>A1,TEXT(A1/1024,"##0,000")&" KB",IF(1000^3>A1,TEXT(A1/1024^2,"##0,000")&" MB",IF(1000^4>A1,TEXT(A1/1024^3,"##0,000")&" GB",IF(1000^5>A1,TEXT(A1/1024^4,"##0,000")&" TB","")))))
Gruß
Rainer