Show value as Kb/Mb/Gb with Excel

There are times when you want Excel to show numbers with a specific unit. In my case, I have a list of memory size that I want to print as Kb, Mb or Gb.

Here is an example of what I achieved:

  • Fill-in the values ;
  • Select the cells to be formatted and right-click on them ;
  • Select the “Format Cells” option ;
  • In the “Category” list, select “Custom” ;
  • Enter the following type :

    [<1000000]# ##0,0 " Ko";[<1000000000]# ##0,0  " Mo";# ##0,0   " Go"

  • Click “OK” to apply the format.



Note that the formula divides by 1000 ; which may not be suitable to convert Bytes to KB/MB/GB.
I also noticed that the formula didn’t work on Excel (14.1.3 110805) for Mac 2011.

That’s All Folks.
Happy rendering!

1 Comment

  • Joel Carnat Fri, 10 Jan 2014 17:37:21 +0000 Reply

    I’ve just discovered here (http://goo.gl/ppdZi0) that you must replace ‘space’ with ‘non-breaking space’, it works on Excel 2011 for Mac. To achieve the ‘non-breaking space’, just use Option-SPACE / alt-SPACE on the Mac keyboard.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

%d bloggers like this: