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

前端 未结 16 1680
忘了有多久
忘了有多久 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 18:53

    I use CDH hadoop and when I export excel report, I have two problems;

    1) convert Linux date to excel date,
    For that, add an empty column next to date column lets say the top row is B4, paste below formula and drag the BLACK "+" all the way to your last day at the end of the column. Then hide the original column

    =(((B4/1000/60)/60)/24)+DATE(1970|1|1)+(-5/24)
    

    2) Convert disk size from byte to TB, GB, and MB
    the best formula for that is this

    [>999999999999]# ##0.000,,,," TB";[>999999999]# ##0.000,,," GB";# ##0.000,," MB"
    

    it will give you values with 3 decimals just format cells --> Custom and paste the above code there

提交回复
热议问题