Forum Discussion

Joelee0810's avatar
Joelee0810
Copper Contributor
Mar 29, 2023
Solved

File size unit conversion and calculation

Hi everyone, I would like standardize the "Usage" Column in MB and turns it into "Number" thus let me do some calcuation .. How can I achieve it ? Thanks !    
  • HansVogelaar's avatar
    Mar 29, 2023

    Joelee0810 

    Let's say the usage data are in B2 and down.

    If you use 1 MB = 1024 KB, enter this formula in C2:

     

    =LEFT(B2,LEN(B2)-3)*IF(RIGHT(B2,2)="KB",1/1024,IF(RIGHT(B2,2)="GB",1024,1))

     

    If you use 1 MB = 1000 KB, it should be

     

    =LEFT(B2,LEN(B2)-3)*IF(RIGHT(B2,2)="KB",1/1000,IF(RIGHT(B2,2)="GB",1000,1))

     

    Fill down.

Resources