Custom format for displaying bytes as kb
, mb
, gb
or tb
.
Response to a few places on the internet: https://productforums.google.com/forum/#!topic/docs/x_T_N-yRUYg And here: https://stackoverflow.com/questions/1533811/how-can-i-format-bytes-a-cell-in-excel-as-kb-mb-gb-etc
Here is one that I have been using:
[<1000000]0.00," KB";[<1000000000]0.00,," MB";0.00,,," GB"
I solved this for nicely formatted binary bytes. Assuming you have raw bytes in field F4, use the formula below to multiply each value by the correct number of 1000/1024, and then use the suggested number format to display it as MB/GB/TB. No If statement needed. If you need to do math on it, just use the raw bytes that you started with, not after the 1000/1024 conversion.
Here's the number formatting guide: https://developers.google.com/sheets/api/guides/formats