New Tool Radar

AI for Data & Spreadsheets

How to Strip Unit Labels From Amounts in Excel So They Sum as Numbers

Remove unit labels such as kg or dollars from amounts with SUBSTITUTE, convert the rest to numbers, and re-check the total.

Schematic with three steps: List the units that appear; Strip the unit and convert in a; Check the total and flag the non-numeric.

An amount written as 12 kg is text, not a number, so SUM skips it and the total comes out short with no error. Strip the unit label first, then convert what is left to a number; keep the unit in its own column if the sheet needs to record it.

What you need

  • Excel with the amounts column holding unit labels
  • An empty helper column beside the data
  • A note of which units appear in the column

Step 1: List the units that appear

Filter the column and list every unit label that appears, such as kg, g, or $. A column with mixed units, such as kg and g, cannot be summed until the units are made consistent.

Step 2: Strip the unit and convert in a helper column

In the helper column, enter =VALUE(TRIM(SUBSTITUTE(SUBSTITUTE(A2,’kg’,”),’$’,”))) and fill it down, adding a SUBSTITUTE for each unit in the list. Copy the results and use Paste Special, Values.

Step 3: Check the total and flag the non-numeric rows

Sum the converted column and compare it with the total you expected. Any cell returning #VALUE! holds something else, such as n/a; list those rows and decide what value, if any, should be used.

Worked example: synthetic weight column with kg labels

The table below is a synthetic example. It shows the expected result of stripping units; no workbook was opened.

Text value Converted Result
12 kg 12 Number
8 kg 8 Number
n/a #VALUE! Flag for a decision
SUM after converting 20 Matches the expected total

Expected result (UNTESTED). the two labelled weights convert to 12 and 8 and sum to 20, while n/a returns #VALUE! and is flagged for a decision instead of being silently treated as zero. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • Mixed units cannot be summed; convert kg and g to one unit before adding.
  • Keep the unit in its own column if the sheet must record it; do not delete the information.
  • A #VALUE! error means the cell is not a number; investigate it rather than hiding it.

Sources

See all