December 27, 2010

Format Excel numbers as GB, MB, KB, B

Refer to Yonah Russ

Here is a great tip for formatting numbers in Excel as Gigabytes, Megabytes, Kilobytes, Bytes, etc.
Use the following formula:

=IF((A1>=POWER(2,30)),

TEXT((A1/POWER(2,30)),"##0.00\G"),

IF((A1>=POWER(2,20)),

TEXT((A1/POWER(2,20)),"##0.00\M"),

IF((A1>=1024),

TEXT((A1/1024),"##0.00\K"),

TEXT((A1),"##0.00\B")

)

)

)

No comments:

Post a Comment