logo
search
Formula Errors

How to Sum Values for Duplicate Numbers in Excel

Steve KSteve K Oct 12, 2026 868 views

Question details

The user wants to identify duplicate numbers in column A and calculate the sum of their corresponding values in column B.

How to Sum Values for Duplicate Numbers in Excel
Product
Excel
Device & OS
not provided
Scenario
Consolidating dataset records by finding duplicate entries in one column and summing up their associated numeric values in an adjacent column.
Observed behavior
The goal is to calculate the total sum for these duplicate entries and display the result either on every row, only once per unique number, or via a summarized PivotTable.
Before you start

Ensure your dataset has clear column headings, particularly if you plan to use a PivotTable, and confirm that the numbers in column B are formatted as numeric values rather than text.

Solution 1

Use SUMIFS to Display the Total on Every Row

Use the SUMIFS function to quickly calculate the total for each value in column A and display it across every corresponding row.

This method is straightforward and ensures that every row shows the total sum for its matching category or number in column A. It is best used when you want to keep all original data rows visible while adding a helper column for totals.

1
Select a target cell

Click on cell C1 (or D1, depending on your layout) to start entering your helper column formula.

2
Enter the SUMIFS formula

Type the formula =SUMIFS(B:B,A:A,A1) and press Enter. This tells Excel to sum everything in column B where column A matches the value in A1.

3
Fill the formula down

Click the small green square at the bottom-right corner of the cell and drag it down to apply the formula to the rest of the rows.

Adjusting Cell References: If your data starts in row 2 due to headers, make sure to adjust your formula to =SUMIFS(B:B,A:A,A2).
Efficient Data Summarization

Easily Sum Data with WPS Spreadsheet

WPS Office provides powerful built-in functions like SUMIFS, COUNTIF, and intuitive PivotTable features, allowing you to sum and summarize duplicate values effortlessly.

  1. 1. Open your dataset in WPS Spreadsheet: Launch WPS Office and open your workbook containing the duplicate data.
  2. 2. Select your target cell: Click on the empty cell where you want the sum to appear.
  3. 3. Apply the SUMIFS formula: Type the formula =SUMIFS(B:B,A:A,A1) and press Enter to instantly calculate the sum.
  4. 4. Use PivotTables for quick summaries: Alternatively, navigate to the 'Insert' tab and click 'PivotTable' to automatically group and sum your duplicate data.
  5. 5. Save your document: Save your document in .xlsx format to ensure full compatibility with other spreadsheet software.
100% compatible with Microsoft Excel formulas and file formatsFree, lightweight, and fast-loading office suiteBuilt-in PivotTable tools for quick and professional data analysisCross-platform support for Windows, Mac, Linux, and mobile
QA img-9

Frequently Asked Questions

Does the SUMIFS formula work if my data has blank cells?

Yes, SUMIFS will still calculate the totals. However, blank cells in your criteria column (Column A) will be treated as a single unique category, and their corresponding values in Column B will be summed together.

How do I remove the duplicate rows after getting my totals?

If you want to keep only the unique rows with their totals, first copy your formula results and paste them as 'Values' to remove the formulas. Then, select your entire dataset, navigate to the 'Data' tab, and click 'Remove Duplicates' based on Column A.

Can I sum multiple columns based on duplicate values in Column A?

Absolutely. You can create additional helper columns with SUMIFS formulas pointing to different target columns (e.g., =SUMIFS(C:C,A:A,A1) for Column C). Alternatively, using a PivotTable allows you to drag multiple fields into the 'Values' area for an instant multi-column summary.