How to Match Similar Names and Count Characters in Excel
Question details
The user needs to clean a large dataset containing staff names with spelling variations, identifying and grouping similar names, and optionally counting specific characters.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Cleaning and standardizing a large list of staff names with inconsistent spellings to generate accurate grouped reports and counts.
- Observed behavior
- Names that belong to the same person are treated as separate entities due to minor spelling variations, leading to fragmented and inaccurate data summaries.
Ensure your data is formatted as an official Excel Table (Ctrl+T) before applying Power Query. It is also recommended to trim any accidental leading or trailing spaces from your names to improve matching accuracy.
Use Power Query Fuzzy Grouping to Consolidate Names
Fuzzy grouping allows Excel to automatically detect and group similar text strings (like minor spelling variations) based on a similarity threshold.
Power Query is a powerful data preparation tool built directly into Excel. By enabling fuzzy matching, you can group slight misspellings of the same staff member's name under one standard representative name without manually fixing each entry.
Select your table of names, navigate to the 'Data' tab on the ribbon, and click 'From Table/Range' to open the Power Query Editor.
In the Home tab of the Power Query Editor, click the 'Group By' button. Select the column containing the staff names.
Check the box labeled 'Use fuzzy grouping' at the bottom of the dialog box. You can expand the fuzzy grouping options to adjust the similarity threshold if the default grouping is too strict or too loose.
Click 'Close & Load To...' from the Home tab and choose 'PivotTable Report' to analyze your newly standardized name groups.

Calculate Character Occurrences Using Formulas
If you need to strictly count how many times a specific character or string of characters appears in a name, use a combination of LEN and SUBSTITUTE functions.
Clean and Standardize Data Easily with WPS Spreadsheet
WPS Spreadsheet offers powerful data processing tools, seamless PivotTable integration, and full compatibility with Microsoft Excel formats. You can quickly consolidate redundant entries, clean text, and generate accurate reports without complex configurations.
- 1. Open your Data: Launch WPS Spreadsheet and open your Excel workbook containing the raw staff names.
- 2. Clean Text Formatting: Use built-in Text formulas like TRIM() and PROPER() to standardize casing and remove hidden spaces across your dataset.
- 3. Create a PivotTable: Navigate to the Insert tab, select PivotTable, and group your standardized names to instantly count occurrences.
- 4. Save and Share: Save your file in .xlsx format, ensuring seamless compatibility for colleagues opening it in Microsoft Excel.

Frequently Asked Questions
Can I adjust how strict the fuzzy matching is in Power Query?
Yes. In the Power Query Group By dialog, you can expand the 'Fuzzy grouping options' and adjust the Similarity Threshold. A value of 1.0 requires an exact match, while lower values (e.g., 0.8) allow for more spelling variations.
Why aren't my PivotTables updating after I correct the spelling in the source data?
PivotTables do not update automatically when source data changes. You must right-click anywhere inside the PivotTable and select 'Refresh' to recalculate and display the corrected names.
How do I measure the exact similarity percentage between two names in Excel?
Standard Excel formulas do not have a built-in similarity percentage function. You would need to use Power Query's fuzzy matching capabilities or install a specialized add-in, such as the Fuzzy Lookup Add-In for Excel, to generate similarity scores.




