Calculation with values expressed in different units (KB, MB, GB)

Remy van Tour picture Remy van Tour · Jul 3, 2014 · Viewed 21.1k times · Source

I am looking for a simple way in Excel to calculate with units of different values. I have a list of several values in KB, MB and GB and I want to get a calculated output in GB.

Here's a piece of the list:

66.0 MB
570 KB
1.10 GB
2.21 KB

Output: ??? GB.

All values are in the same row (C) with B/KB/MB/GB behind the value.

Answer

Danielle picture Danielle · Jul 3, 2014

Assuming the list is in range A1 to A4

{=SUM(VALUE(LEFT(A1:A4,FIND(" ",A1:A4)))*IF(RIGHT(A1:A4,2)="MB",1/1000,IF(RIGHT(A1:A4,2)="KB",1/1000000,1)))}