Find New Account Numbers in Excel with XLOOKUP or VLOOKUP
Question details
Find replacement creditor account numbers using old account numbers and a separate mapping table.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains old creditor account numbers, and a lookup table lists their corresponding new account numbers.
- Observed behavior
- Each old account number should return its matching replacement number or indicate that no match exists.
Check that the mapping table has old account numbers in column A and new account numbers in column B. Ensure matching account numbers use the same text or numeric format, preserving any leading zeros.
Use XLOOKUP to return the replacement account number
Use this method in an Excel version that supports XLOOKUP.
Place the old and new account numbers in columns A and B of a worksheet named Mapping. If the table is in another workbook, open that workbook as well.
In the results column next to the old account number in A2, enter =XLOOKUP(A2,Mapping!$A$2:$A$1000,Mapping!$B$2:$B$1000,"Not found"). Adjust the ranges to cover your mapping table.
Select the formula cell and drag its fill handle down to look up the remaining account numbers.

Use VLOOKUP for an exact account number match
Use VLOOKUP when XLOOKUP is unavailable or when you need a formula compatible with older Excel versions.
Map Account Numbers with VLOOKUP in WPS Spreadsheet
Open your account list in WPS Spreadsheet and use an exact-match VLOOKUP formula to retrieve replacement numbers from a mapping sheet.
- 1. Open the account list: Open WPS Spreadsheet and select Open to load the workbook containing the old account numbers.
- 2. Prepare the mapping sheet: Add or open a worksheet named Mapping with old account numbers in column A and replacement numbers in column B.
- 3. Enter VLOOKUP: In a cell beside the old account number in A2, enter =IFERROR(VLOOKUP(A2,Mapping!$A$2:$B$1000,2,FALSE),"Not found"). Adjust the range to fit your table.
- 4. Apply the formula: Drag the formula cell's fill handle down, then use File > Save As to save the updated workbook.

Frequently Asked Questions
Why does a matching account number return Not found?
Check that the old number and the mapping table entry have the same text or numeric format and contain no extra spaces. Preserve leading zeros when the account number is an identifier.
Can I look up account numbers from a separate Excel file?
Yes. Open the mapping workbook and reference its sheet and ranges in the formula, for example '[AccountMapping.xlsx]Mapping'!$A$2:$B$1000. Keep the file accessible and update links when Excel prompts you.
What if my version of Excel does not have XLOOKUP?
Use =IFERROR(VLOOKUP(A2,Mapping!$A$2:$B$1000,2,FALSE),"Not found") instead. The old account numbers must be in the first column of the lookup range.
What happens if the mapping table contains duplicate old account numbers?
XLOOKUP and VLOOKUP return the first matching entry in the specified range. Check the Mapping sheet for duplicates if each old number should have only one replacement.




