How can I format bytes a cell in Excel as KB, MB, GB etc?

前端 未结 16 1674
忘了有多久
忘了有多久 2020-12-22 18:46

I have a value in a cell that\'s in bytes. But nobody can read 728398112238. I\'d rather it say 678.37GB

To write a formula to format it relatively easy (here\'s one

16条回答
  •  星月不相逢
    2020-12-22 19:00

    Though Excel format conditions will only display 1 of 3 conditions related to number size (they code it as "positive; negative; zero; text" but I prefer to see it as : if isnumber and true; elseif isnumber and false; elseif number; elseif is text )

    so to me the best answer is David's as well as Grastveit's comment for other regional format.

    Here are the ones I use depending on reports I make.

    [<1000000]#,##0.00," KB";[<1000000000]#,##0.00,," MB";#,##0.00,,," GB"
    
    [>999999999999]#,##0.00,,,," TB";[>999999999]#,##0.00,,," GB";#.##0.00,," MB"
    
    [<1000000]# ##0,00 " KB";[<1000000000]# ##0,00  " MB";# ##0,00   " GB"
    
    [>999999999999]# ##0,00    " TB";[>999999999]# ##0,00   " GB";# ##0,00  " MB"
    

    Take your pick!

提交回复
热议问题