If it's tech related...I'll post it here. Lotus Notes/Domino, AS400 or iSeries, PC's, PDA's, iPods, Android -- Whatever.
Friday, May 30, 2014
Calculate Bytes to GB, MB,KB, B in an Excel Worksheet Cell
Have you ever needed to enter storage information into a worksheet and the data was in bytes... but you wanted to convert it to something else? I'm working on an analysis on my disk utilization on my Domino servers and copied the data into an Excel worksheet. The storage for the files is shown in bytes. Using the below formula, it will take that number and show it as bytes, kilobytes, megabytes or gigabytes (I'll eventually have it show terabytes as well). It's short, simple and works just as I needed it.
=IF((F3>=POWER(2,30)),
TEXT((F3/POWER(2,30)),"##0.00\G"),
IF((F3>=POWER(2,20)),
TEXT((F3/POWER(2,20)),"##0.00\M"),
IF((F3>=1024),
TEXT((F3/1024),"##0.00\K"),
TEXT((F3),"##0.00\B")
)
)
)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment