Use SUMIF in Excel to Total Values Matching a Name
Question details
Find a formula that matches a name in one column and totals the corresponding values in another column.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Names are listed in column A, values are in column Z, and each name to total is listed in column E.
- Observed behavior
- The desired result is a separate total for each name based on matching rows.
Check that names are in A3:A150, the corresponding amounts are in Z3:Z150, and the first name to look up is in E160. Make sure the amounts are stored as numbers.
Sum matching rows with SUMIF in Excel
Use SUMIF when one name determines which values should be added.
SUMIF adds values that meet one condition. COUNTIFS counts matching rows instead of totaling their values.
Select F160, or another empty cell beside the first lookup name, and enter =SUMIF($A$3:$A$150,E160,$Z$3:$Z$150). Press Enter.
Select the formula cell and drag its fill handle down alongside the remaining names in column E.
If your data is elsewhere, edit the formula so the name range and sum range cover corresponding rows. The dollar signs keep those ranges fixed when you fill down, while E160 changes for each row.

Total values by name with SUMIF in WPS Spreadsheets
Use the same SUMIF formula in WPS Spreadsheets to match names and add their corresponding values, then fill it down for the rest of your list.
- 1. Open the workbook: Open WPS Spreadsheets and use Open to select your Excel workbook.
- 2. Check the columns: Confirm that names are in A3:A150, amounts are in Z3:Z150, and the first lookup name is in E160.
- 3. Enter SUMIF: Select F160 and enter =SUMIF($A$3:$A$150,E160,$Z$3:$Z$150), then press Enter.
- 4. Fill and save: Drag the formula cell's fill handle down for the other names, then use File > Save to save the workbook.

Frequently Asked Questions
Why should I use SUMIF instead of COUNTIFS?
SUMIF adds values in a sum range when a condition is met. COUNTIFS counts rows that meet one or more conditions; it does not total amounts.
What do the dollar signs in the formula do?
In $A$3:$A$150 and $Z$3:$Z$150, the dollar signs lock the ranges when you fill the formula down. The relative reference E160 changes to E161, E162, and so on.
Why is SUMIF returning zero for a name?
Check that the name in E160 matches an entry in A3:A150 without extra spaces, and that the corresponding values in Z3:Z150 are stored as numbers.
Can I use this formula in WPS Spreadsheets?
Yes. Open the workbook in WPS Spreadsheets and enter =SUMIF($A$3:$A$150,E160,$Z$3:$Z$150) in an empty cell, adjusting the ranges to match your sheet.




