Hit Ctrl+F8 (menu:View>Highlight).
Constant numbers appear in blue font. Constant text appears in black font.
-- There is no way to apply number formats to text.
-- There is no way to apply a number format to a number so the cell displays a value other than the actual cell value. A numeric cell value can be displayed in many ways though.
-- A kilobyte has 1024 (2^10) bytes. 1000 (10^3) is a rough approximation. Same with mega, giga, tera.
IMHO, there is only one way to handle this mess: Enter/import/paste plain numbers and their units seperated from each other.
Having some numeric value in A1 and a unit text in B1, the formula to get the Bytes is:
Code: Select all
=A1*(2^(10*(MATCH(B1;{"b";"k";"m";"g";"t"};0)-1)))
assuming the units are B for single Bytes and K, M, G, T for kilo, mega, giga, tera.
(MATCH(B1;{"b";"k";"m";"g";"t"};0)-1) returns 0,1,2,3 or 4 depending on the position where B1 is matched in the {array} or error #N/A if B1 is something completely different.
Each unit is 2^10 times the previous one and this multiplied by the number in A1 gives the result in the smallest common unit Bytes which can be calculated with other Byte values and finally divided by 2^10, 2^20, 2^30 or 2^40 in order to get kilo, mega, giga and tera.