How to correctly sum numbers with units in a range in Excel?
When working with Excel, you may encounter a situation where you need to sum numbers that include units, such as "5kg" or "12lbs." However, using the standard SUM formula won't provide accurate results, as Excel treats numbers with units as text. In this tutorial, we’ll explore effective methods to correctly sum numbers with units, using formulas and powerful tools like Kutools for Excel.
Sum numbers with units using a formula
In Excel, you can use a formula to handle this task.
Select a blank cell, and type this formula =SUM(SUBSTITUTE(B2:B7, "kg", "") + 0) into it, and then press Shift + Ctrl + Enter keys simultaneously to get the correct result.



Tip: In the formula above, B2:B7 represents the range containing numbers with units you want to sum, and "kg" is the unit in the data range. Ensure all numbers in the range share the same unit for the formula to work correctly!
Sum numbers with units using Kutools for Excel
If you do not like to apply long formula to solve this job because it is difficult to remember, you can try to remove all characters but only numeric ones by applying Kutools for Excel’s Remove Characters utility and then sum them by a simple formula.
1. Select the numbers which are concatenated with units, and click Kutools > Text > Remove Characters. See screenshot:
2. Then check Non-numeric option only in the Remove Characters dialog. See screenshot:
3. Click Ok or Apply, and only numbers in the selected cells are kept. And then select a blank cell to type this =SUM(B2:B7) formula to calculate the result. See screenshot:



Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now
Sum Numbres With Same Unit Using Kutools for Excel and SUM function
Sum numbers based on same unit with Kutools for Excel
If there is a table contains fruits, numbers and different units as below screenshot shown, how can you sum the numbers based on the same unit, such as 11 Kg+7 Kg, 9 Pound+11 Pound.
Kutools for Excel - Packed with over 300 essential tools for Excel. Enjoy permanently free AI features! Download now!
1. Select a cell to place the summed result, click Kutools > Formula Helper > Statistical > Sum based on same text.
2. In the Formulas Helper dialog, go to Arguments input section, choose the range that contains numbers and units in to the Range textbox, and choose the unit text or type the unit text you want to sum based on in Text textbox. Click Ok.
Tip: By default, the cell reference in the Arguments input section is displayed as absolute. Change it to relative if you plan to apply the formula using the auto-fill handle.
Then the first summed result has been gotten.
Combine duplicate row and sum corresponding numbers using Kutools for Excel
But sometimes, if your data range includes multiple units as below screenshot shown and you want to sum the numbers with same unit, in this case, you also can use Advanced Combine Rows function of Kutools for Excel to solve.
1. Select the data range and click Kutools > Merge & Split > Advanced Combine Rows. See screenshot:
2. In the Combine Rows Based on Column dialog, select the Unit column and click Primary Key to mark it as primary key. See screenshot:
3. Then select the Weight column which contains the numbers and click Calculate > Sum. See screenshot:
4. Click Ok and now the same units are summed up.
Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now
Combine Duplicates And Sum Numbers
Relative Articles:
- How to combine multiple cells with leading zeros into a cell in Excel?
- How to combine ranges from different worksheets/workbook into one?
- How to quickly merge rows based on one column value then do some calculations in Excel?
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!