📜  excel如何将字节格式化为KB,MB,GB - VBA代码示例

📅  最后修改于: 2022-03-11 14:51:56.202000             🧑  作者: Mango

代码示例1
'Use Excel Number Formats to format bytes as KB or MB or GB.

'Select the range and apply the following number format:
[<1000000]0.00," KB";[<1000000000]0.00,," MB";0.00,,," GB"

'Or for Excel versions that use the comma as the decimal separator:
[<1000000]#.##0,00" KB";[<1000000000]#.##0,00.." MB";#.##0,00..." GB"