Data Import & Export

How to Align Data from Two Excel Sheets by ID in WPS Office

Adam DavisAdam Davis Nov 13, 2026 869 views

Question details

How to compare two yearly Excel worksheets that have different column orders and create a side-by-side comparison table based on a shared ID field.

How to Align Data from Two Excel Sheets by ID in WPS Office
Product
WPS Office Spreadsheets
Device & OS
not provided
Scenario
The user has two yearly worksheets with different column orders and wants to create a side-by-side comparison keyed by a shared ID.
Observed behavior
Goal state: a side-by-side comparison sheet that reorders and aligns matching records from each yearly sheet by shared ID, with clear handling for missing or mismatched IDs.
Before you start

Open both yearly sheets in WPS Office Spreadsheets and confirm that each sheet has a reliable shared ID column, such as Employee ID or Product Code. Check for blank or duplicate IDs in the comparison range before building formulas.

Solution 1Recommended

Use VLOOKUP to Build a Side-by-Side Comparison by ID

Best when the shared ID column is available in each sheet and you want a simple formula that quickly pulls matching values into a comparison sheet.

This method works well when the source tables have the same records and you know the column position of each field in the source sheets. Wrap the lookup with IFERROR if some IDs may be missing.

1
Create the Comparison sheet

Open WPS Office Spreadsheets and click the plus (+) icon next to the sheet tabs to add a new worksheet. Rename it Comparison.

2
List the shared IDs

Copy the ID column from the first yearly worksheet into column A of the Comparison sheet, then click Data > Remove Duplicates to keep one row per ID.

3
Enter the VLOOKUP formula

In cell B2, enter =VLOOKUP($A2,'2023'!$A:$F,2,FALSE). Replace '2023'!$A:$F with the source sheet name and range, and set the index number to the column you want to return.

4
Copy the formula across comparison columns

Drag the fill handle right and down to populate the remaining cells. For each field, update the column index number to match the source sheet column position.

Use VLOOKUP to Build a Side-by-Side Comparison by ID
Comparison aligned: The Comparison sheet now shows the matching record from both years side by side. Use IFERROR around the formula if you want blank cells instead of error values for missing IDs.
Direct WPS Office solution

Align Excel Sheets by ID in WPS Office Spreadsheets

Use WPS Office Spreadsheets to compare two yearly Excel sheets by a shared ID. Create a comparison sheet, use VLOOKUP or INDEX MATCH to pull matching fields, and save the result as an .xlsx file that stays compatible with Microsoft Excel.

  1. 1. Open both yearly workbooks: Launch WPS Office and open both Excel files in WPS Spreadsheets. Use Menu > Open if the files are not in the recent list.
  2. 2. Create a new Comparison sheet: In the workbook where you want the comparison, click the plus (+) icon next to the sheet tabs to add a new worksheet and rename it Comparison.
  3. 3. List the shared ID values: Copy the ID column from one yearly sheet into column A of the Comparison sheet, then click Data > Remove Duplicates to create one row per ID.
  4. 4. Add lookup formulas: In cell B2, enter =VLOOKUP($A2,'2023'!$A:$F,2,FALSE) or =INDEX('2023'!$B:$B,MATCH($A2,'2023'!$A:$A,0)). Adjust the sheet names and ranges to match your source workbooks.
  5. 5. Fill and verify the comparison: Drag the formulas across and down, wrap them with IFERROR to handle missing values if needed, and save the file as .xlsx to preserve compatibility with Microsoft Excel.
Align mismatched column orders without manually reordering either source sheetUse familiar VLOOKUP and INDEX MATCH formulas in WPS OfficeOpen and save .xlsx files with full Microsoft Excel format compatibilityFree, lightweight spreadsheet app with a familiar Office-style interface
microsoft office alternative - wps office

Frequently Asked Questions

Can WPS Office compare two Excel sheets with different column orders?

Yes. In WPS Office Spreadsheets, create a comparison sheet with the shared ID column and use VLOOKUP or INDEX MATCH to return fields from each yearly sheet. You do not need to reorder the source columns first.

What is the best formula when the shared ID is not in the first column?

Use INDEX MATCH. The formula =INDEX(return_range,MATCH(lookup_value,lookup_range,0)) lets you match any ID column and return any other column without counting a fixed column index.

How do I handle IDs that appear in only one year?

Wrap the lookup formulas with IFERROR to show a blank or zero, or add a helper column that detects missing IDs. Then filter the helper column to review exceptions before finalizing the comparison sheet.

Does WPS Office support .xlsx files from Microsoft Excel?

Yes. WPS Office opens and saves .xlsx files and supports widely used Excel functions such as VLOOKUP, INDEX MATCH, and IFERROR, so your comparison workbook remains compatible with Microsoft Excel.