How to Group and Sum Similar Names in Excel
Question details
The user needs a method to group records and calculate totals for individuals whose names are formatted differently or spelled with slight variations across rows.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Consolidating financial or dataset records where people's names are not perfectly identical due to different middle initials, typos, or varying formats.
- Observed behavior
- Standard aggregation functions and Pivot Tables treat slight name variations as completely different entities, failing to group their totals accurately.
Review your dataset to identify the most common spelling variations and ensure that your values columns are formatted as Numbers before you apply any aggregation formulas.
Use a Lookup Table with VLOOKUP and SUMIF
The most reliable method for handling varied name spellings is manually mapping each variation to a standard unique identifier.
By mapping out every spelling variation to a single, standardized name, you create a clean data column. You can then use standard summation formulas on this new clean column.
Open a new worksheet. In column A, list every name variation found in your data. In column B, enter the correct, standardized name or unique ID for each variation.
Return to your main dataset. Insert a new column next to your existing names column and label it 'Standard Name'.
In the first cell of your new column, enter the formula =VLOOKUP(A2, LookupSheet!A:B, 2, FALSE) replacing A2 with the cell containing the varied name, and LookupSheet with your mapping sheet's name. Drag the formula down to fill the column.
Create a summary list of your standardized names. Use the formula =SUMIF(MainSheet!B:B, SummarySheet!A2, MainSheet!C:C) where B is the Standard Name column and C is the values column to sum.

Use Fuzzy Matching in Power Query
For larger datasets with unpredictable typos, Power Query's fuzzy matching can automatically identify and group similar text strings without a manual lookup table.
Group and Calculate Data Seamlessly with WPS Spreadsheet
WPS Spreadsheet fully supports advanced functions like VLOOKUP, XLOOKUP, and SUMIFS, making it incredibly easy to group and calculate totals for varied data. It offers a highly compatible, fast, and lightweight environment for all your data analysis tasks.
- 1. Open your dataset: Launch WPS Spreadsheet and open the file containing your unstandardized names and numerical data.
- 2. Create a mapping sheet: Add a new worksheet to list all spelling variations alongside their standardized unique names.
- 3. Standardize the data: Use the built-in XLOOKUP or VLOOKUP function in your main data sheet to match each variation to its standard identifier.
- 4. Calculate the totals: Apply the SUMIF function, selecting your new standardized name column as the criteria range, to instantly calculate your grouped totals.

Frequently Asked Questions
Can I use a Pivot Table to group similar names?
A standard Pivot Table will treat slight text variations (like 'John Doe' and 'J. Doe') as completely separate rows. You must first standardize the names using a lookup column or Power Query before building the Pivot Table to ensure accurate grouping.
What is the difference between SUMIF and SUMIFS?
SUMIF calculates totals based on a single condition, such as matching a standardized name. SUMIFS allows you to apply multiple conditions, such as summing values for a specific standardized name only within a certain date range or category.
Why is my VLOOKUP returning an #N/A error for some names?
The #N/A error means the specific name variation in your main dataset does not exist in your lookup table, or there are hidden spaces in the cell. Ensure all spelling variations are mapped and consider using the TRIM function to remove extra spaces before looking up the values.
Can I use wildcards to sum similar names?
Yes, for simple variations you can use asterisks as wildcards in your SUMIF formula. For example, =SUMIF(A:A, "*Smith*", B:B) will sum all values where the name contains 'Smith'. However, this method is less precise than a lookup table and may accidentally group unrelated names.




