How to Align Data from Two Excel Sheets by ID in WPS Office
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.

- 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.
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.
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.
Open WPS Office Spreadsheets and click the plus (+) icon next to the sheet tabs to add a new worksheet. Rename it Comparison.
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.
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.
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 INDEX MATCH for Flexible Lookup by ID
Use this when the shared ID is not in column A or when the column order varies so much that a fixed VLOOKUP column index is hard to maintain.
Add a Helper Column to Check Missing or Mismatched IDs
Use this when you need to verify that both yearly sheets contain the same IDs before finalizing the comparison, especially if a record may exist in only one year.
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. 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. 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. 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. 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. 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.

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.




