I'm attempting to convert data from an excel sheet that is stored in GB, MB, TB, and KB units. Everything needs to be changed to GB.

Here is the formula I use:

```=IF(ISERROR(FIND("GB",H2))=FALSE,VALUE(LEFT(H2,FIND("GB",H2)-1)*1),IF(ISERROR(FIND("TB",H2))=FALSE,VALUE(LEFT(H2,FIND("TB",H2)-1)*1024),VALUE(LEFT(H2,FIND("MB",H2)-1)/1024),VALUE(LEFT(H2,FIND("KB",H2)-1)/1048576)))
```

I get an error with too many arguments.

Oct 31, 2022 in Others 1,024 views

## 1 answer to this question.

Use this array formula:

```=LEFT(A1,MIN(IFERROR(FIND({"KB","MB","GB","TB"},A1),1E+99))-1)/INDEX({1048576,1024,1,0.0009765625},MATCH(RIGHT(A1,2),{"KB","MB","GB","TB"},0)) & "GB"
```

Being an array formula it needs to be confirmed with Ctrl-Shift-Enter instead of enter. If done correctly then excel will put {} around the formula. If your string always ends with the size then you can use this normal formula:

`=LEFT(A1,LEN(A1)-2)/INDEX({1048576,1024,1,0.0009765625},MATCH(RIGHT(A1,2),{"KB","MB","GB","TB"},0)) & "GB"`

I hope this helps you.

• 63,160 points

## Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE

## Convert column in excel date format (DDDDD.tttt) to datetime using pandas

Given # s = df['date'] s 0 ...READ MORE

## Convert PDF to Excel in Java

You can convert a PDF document to ...READ MORE

## Excel Formula to convert from cm to inches and feet & round off to two digits

Use the TEXT function to format, and ...READ MORE

## Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

Forget the PsychoPy complications for the time ...READ MORE

## In Blue Prism how to split excel column data into TWO columns

This is how I am doing it. Dim ...READ MORE

## Excel Power Query: Using List.MatchAny on a column value

try this. let TableA = ...READ MORE