Function Problems

Automatically Update a Payroll Sheet from Another Excel Worksheet

Jason MillerJason Miller Dec 2, 2026 868 views

Question details

Automatically populate payroll allocations by matching employees to imported ADP data on another worksheet.

Automatically Update a Payroll Sheet from Another Excel Worksheet
Product
Microsoft Excel
Device & OS
not provided
Scenario
A payroll worksheet needs to retrieve allocation amounts from an imported ADP worksheet using an employee ID or staff name.
Observed behavior
The desired result is for payroll amounts to update when the corresponding imported source data changes.
Before you start

Check that the imported ADP data includes an employee identifier and the amount to retrieve. Prefer unique employee IDs, and make sure IDs use the same format in both worksheets.

Solution 1Recommended

Use XLOOKUP with Excel Tables

Use this method in Excel versions that support XLOOKUP, including Microsoft 365.

The example assumes each employee has one matching source row. XLOOKUP returns the first match, so multiple allocation rows per employee require a different approach, such as SUMIF.

1
Create the source table

Select the imported ADP data and choose Insert > Table. On the Table Design tab, name the table ADP and confirm that its columns are named EmployeeID and Amount.

2
Create the payroll table

Select the payroll range and choose Insert > Table. Ensure it has an EmployeeID column and a column for the retrieved amount.

3
Enter the lookup formula

In the first data cell of the payroll amount column, enter =XLOOKUP([@EmployeeID],ADP[EmployeeID],ADP[Amount],0). Excel can fill the formula down the table column.

4
Update the source data

Refresh or replace the imported ADP data in the source table. Add new rows within the table so its structured references include them, and check that the import preserves the table.

Use XLOOKUP with Excel Tables
Check unmatched IDs: The formula returns 0 when no employee ID is found. Verify unexpected zero amounts against the source data and ID formatting.
Update payroll data in WPS Office

Link Payroll Amounts to ADP Data in WPS Spreadsheet

Use INDEX and MATCH in WPS Spreadsheet to retrieve payroll amounts from an ADP worksheet and recalculate them when the source cells change.

  1. 1. Open the workbook: Open your Excel workbook in WPS Spreadsheet and place the imported source data on a worksheet named ADP.
  2. 2. Check the columns: On the ADP sheet, put employee IDs in column A and amounts in column B. On the payroll sheet, put the employee ID for the first employee in A2.
  3. 3. Enter the formula: In the first payroll amount cell, enter =IFERROR(INDEX(ADP!$B$2:$B$1000,MATCH(A2,ADP!$A$2:$A$1000,0)),0). Adjust the ranges if your source data extends beyond row 1000.
  4. 4. Fill and update: Drag the formula cell's fill handle down for the other employees. Update the ADP sheet when new data is available, then use File > Save to save the workbook.
Match payroll amounts by employee IDOpen and save Microsoft Excel XLSX workbooksUse familiar spreadsheet formulas and cell referencesWork with payroll and source data in one workbook
microsoft office alternative - wps office

Frequently Asked Questions

Can I match employees by name instead of ID?

Yes. Replace the EmployeeID references in the lookup formula with the corresponding name columns. IDs are safer because names may be duplicated or spelled differently.

What if an employee has multiple ADP allocation rows?

XLOOKUP and INDEX/MATCH return one matching row. To total multiple rows, use a formula such as =SUMIF(ADP[EmployeeID],A2,ADP[Amount]) if the amounts should be added together.

Will the formula import new ADP data automatically?

No. The formula retrieves values already in the workbook. Refresh the import or replace the source data in the ADP table; the formula then recalculates from that data.

Why does the formula return zero for an employee?

The ID may be missing or formatted differently in the two sheets. Compare the payroll ID with the ADP EmployeeID column, including whether one value is stored as text and the other as a number.