How to Sum Values for Duplicate Numbers in Excel
Question details
The user wants to identify duplicate numbers in column A and calculate the sum of their corresponding values in column B.

- 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.
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.
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.
Click on cell C1 (or D1, depending on your layout) to start entering your helper column 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.
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.
Use IF, COUNTIF, and SUMIF to Display Totals Only Once
Combine IF, COUNTIF, and SUMIF to display the sum on the first occurrence of the duplicate number and leave subsequent rows blank.
Use a PivotTable for a Clean Summary
Insert a PivotTable to automatically group duplicate numbers and display their summarized totals without writing any formulas.
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. Open your dataset in WPS Spreadsheet: Launch WPS Office and open your workbook containing the duplicate data.
- 2. Select your target cell: Click on the empty cell where you want the sum to appear.
- 3. Apply the SUMIFS formula: Type the formula =SUMIFS(B:B,A:A,A1) and press Enter to instantly calculate the sum.
- 4. Use PivotTables for quick summaries: Alternatively, navigate to the 'Insert' tab and click 'PivotTable' to automatically group and sum your duplicate data.
- 5. Save your document: Save your document in .xlsx format to ensure full compatibility with other spreadsheet software.

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.





