Skip to main content

How to correctly sum numbers with units in a range in Excel?

Author: Sun Last Modified: 2024-11-26

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.

A screenshot showing the formula for summing numbers with units in Excel
Arrow
A screenshot of the correct summed result of numbers with units

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.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Select the numbers which are concatenated with units, and click Kutools > Text > Remove Characters. See screenshot:

A screenshot of the Remove Characters option in Kutools tab in Excel

2. Then check Non-numeric option only in the Remove Characters dialog. See screenshot:

A screenshot showing the Remove Characters dialog box

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:

A screenshot showing the cleaned numeric values after using Kutools
Arrow
A screenshot of the final summed result in Excel

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

Kutools for Excel: Over 300 handy tools at your fingertips! Enjoy permanently free AI features! Download Now!

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.
A table with numbers and different units like Kg and 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.
A screenshot of the Formula Helper tool for summing based on text in Kutools tab in Excel

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.
A screenshot of the Arguments input section for summing based on unit

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.
A screenshot of the final result showing summed values for each unit in Excel


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.

A table containing fruits with weights and multiple units in Excel

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Select the data range and click Kutools > Merge & Split > Advanced Combine Rows. See screenshot:

A screenshot of the Advanced Combine Rows option in Kutools tab in Excel

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:

A screenshot of the Combine Rows Based on Column dialog showing the primary key option

3. Then select the Weight column which contains the numbers and click Calculate > Sum. See screenshot:

A screenshot showing the Calculate Sum option

4. Click Ok and now the same units are summed up.

A screenshot of the final table with summed numbers grouped by units

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now

Combine Duplicates And Sum Numbers

Kutools for Excel: Over 300 handy tools at your fingertips! Enjoy permanently free AI features! Download Now!

Relative Articles:

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

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!