Function Problems

Excel Formula to Look Up an SSN from Another Worksheet

Emma BrownEmma Brown Dec 2, 2026 868 views

Question details

Find the SSN associated with a name or member ID on another worksheet and return a blank when there is no match.

Look Up an SSN from Another Worksheet in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains names or member IDs, while a second worksheet contains the matching identifiers and SSNs.
Observed behavior
A lookup formula should return the corresponding SSN for each matching name or member ID, or a blank if no match exists.
Before you start

Check which columns contain the matching names or member IDs and SSNs on the source sheet. Ensure matching IDs use consistent text or number formats, and store SSNs consistently so leading zeros are preserved.

Solution 1Recommended

Use VLOOKUP to Return an SSN from Another Worksheet

Use this method when the source sheet has names or member IDs in the first column of the lookup range and SSNs in the next column.

1
Check the source columns

On the source worksheet, place the names or member IDs in column A and the corresponding SSNs in column B. This example calls the worksheet Second Sheet.

2
Enter the formula

On the destination worksheet, select the cell where you want the SSN for the identifier in A2 and enter =IFERROR(VLOOKUP(A2,'Second Sheet'!A:B,2,FALSE),""). Replace Second Sheet with the actual worksheet name.

3
Fill down

Press Enter, then drag the cell's fill handle down to apply the formula to the remaining rows.

Use VLOOKUP to Return an SSN from Another Worksheet
Check unexpected blanks: IFERROR hides all formula errors, not just missing matches. If a result is unexpectedly blank, temporarily remove IFERROR to inspect the error. VLOOKUP returns the first match when identifiers are duplicated.
Look up values across worksheets

Look Up SSNs Across Worksheets in WPS Spreadsheets

Use a VLOOKUP formula in WPS Spreadsheets to match a name or member ID with an SSN on another worksheet and display a blank for errors.

  1. 1. Open the workbook: Open WPS Spreadsheets and use Open to select your workbook.
  2. 2. Check the source sheet: On the source worksheet, check that column A contains the matching names or member IDs and column B contains the SSNs.
  3. 3. Enter VLOOKUP: On the destination sheet, select the result cell for A2 and enter =IFERROR(VLOOKUP(A2,'Second Sheet'!A:B,2,FALSE),""). Replace Second Sheet with your source worksheet's name.
  4. 4. Apply the formula: Press Enter and drag the fill handle down to look up the remaining rows.
Match member IDs or names to SSNs across worksheetsOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet formulas and a fill handleWork with a free, easy-to-use office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does my lookup return a blank for an existing member ID?

Check that the ID in A2 and the source column use the same text or number format and do not contain extra spaces. With IFERROR, other formula errors also appear blank; temporarily remove IFERROR to see the underlying error.

What if the worksheet name contains spaces?

Enclose the worksheet name in single quotation marks in the formula, as in 'Second Sheet'!A:B. Replace Second Sheet with your actual sheet name.

Can VLOOKUP return an SSN from a column to the left of the ID?

No. VLOOKUP searches the first column of its selected range and returns a value to its right. Rearrange the columns or use XLOOKUP, which lets you select lookup and return columns independently.

What happens if two rows have the same name or member ID?

The formulas shown return the first matching row. Use a unique member ID where possible and check the source worksheet for duplicates.

How can I keep leading zeros in SSNs?

Store SSNs consistently as text on the source sheet, including any leading zeros. If they are stored as numbers, use an appropriate custom number format for display, but note that formatting alone does not change the stored value.