Power Query Problems

Match and Combine Data from Two Excel Sheets with Similar Names

Bushra ParveenBushra Parveen Oct 20, 2026 870 views

Question details

The user needs to merge PC hardware and user information from two different Excel sheets where the primary matching key (PC names) contains duplicates and slight textual variations.

How to Combine and Match Data from Two Sheets with Similar Names in Excel
Product
Microsoft Excel 365
Device & OS
not provided
Scenario
Consolidating a large dataset of approximately 1,400 computers from two sheets into one master list, requiring deduplication and standardizing slightly mismatched PC names to correctly append Windows build, location, and device type.
Observed behavior
The PC names contain inconsistent text formatting and duplicate records, preventing a direct 1:1 data merge using standard lookup formulas without prior data cleaning or advanced fuzzy matching.
Before you start

Before modifying or deduplicating your dataset, ensure you create a copy of your original workbook to prevent accidental data loss during the merging process.

Solution 1Recommended

Standardize PC Names and Match Data Using XLOOKUP

Use built-in Excel functions to clean up formatting inconsistencies and remove duplicates before merging data with XLOOKUP. This is ideal when PC names can be made perfectly identical.

Before performing any lookup between two sheets, it is crucial to ensure your matching keys (in this case, PC Names) are formatted identically. Even a single hidden space can cause standard formulas to fail.

1
Clean up text formatting

In a new helper column, use a formula like =UPPER(TRIM(CLEAN(A2))) to remove extra spaces, strip out non-printable characters, and standardize the capitalization of your PC names.

2
Remove duplicate entries

Select your cleaned dataset, navigate to the Data tab, and click "Remove Duplicates". Ensure you first sort the data to retain the most complete or recent record.

3
Apply the XLOOKUP formula

In Sheet 2, type the formula =XLOOKUP([@[PC Name]],Sheet1[PC Name],Sheet1[Windows Build],"Not found") to pull the specific data columns you need from Sheet 1.

Standardize PC Names and Match Data Using XLOOKUP
Pro Tip: You can use the SUBSTITUTE function inside your XLOOKUP array if you need to strip out specific unwanted characters, such as hyphens or underscores, dynamically.

Consolidate and Match Sheet Data Easily with WPS Spreadsheet

WPS Spreadsheet offers powerful data handling tools, including seamless XLOOKUP support and one-click duplicate removal. You can accurately standardize and merge large datasets across multiple sheets without dealing with complex query errors.

  1. 1. Open your datasets: Launch WPS Spreadsheet and open the workbooks containing your PC inventory lists.
  2. 2. Clean and deduplicate: Use the built-in Text tools and "Remove Duplicates" feature located in the Data tab to standardize your primary columns.
  3. 3. Merge using formulas: Insert the XLOOKUP function to seamlessly pull and match hardware details across different sheets.
Fully compatible with advanced Microsoft Excel functions like XLOOKUP and SUBSTITUTE.Intuitive Data tab tools for rapid deduplication and text cleaning.Lightweight architecture ensures fast processing even with thousands of rows.Familiar user interface makes data migration effortless.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my XLOOKUP return 'Not found' when names look the same?

This usually happens due to invisible trailing spaces, non-printable characters, or case mismatches. Wrap your cell references in TRIM and CLEAN functions to standardize the text before matching.

What is a Fuzzy Merge in Power Query?

Fuzzy matching is a feature in Power Query that identifies and merges rows containing text that is similar but not exactly identical, allowing you to bypass minor typos or inconsistent naming conventions without strict 1:1 matches.

How do I handle duplicate PC names when merging?

Before merging, you must define a business rule to deduplicate your data. Decide whether to keep the newest record or the row with the most complete information, sort your data accordingly, and use the Remove Duplicates tool to leave only unique identifiers.

Why does a query work in a test workbook but fail in my original file?

Errors often occur due to mismatched table names, slightly different column headers, or differing data types between the two workbooks. Always check for hidden spaces in headers and ensure data types match perfectly in the Power Query Editor.