To look up names in Excel, the fastest method is using the XLOOKUP function (available in Microsoft 365 and Excel 2021) or the VLOOKUP function for older versions. These tools allow you to enter a unique identifier—such as an ID number or email—and automatically retrieve the corresponding name from a separate table or list.

What You'll Need

  • Microsoft Excel installed on your computer.
  • A data set containing a "lookup value" (the unique ID you are searching for) and a "return value" (the name you want to find).
  • The data must be organized in columns or rows.

Step-by-Step

Depending on your version of Excel, choose one of the two methods below. Note that menu labels and function availability may differ slightly by version or region.

Method 1: Using XLOOKUP (Recommended for Modern Excel)

  1. Identify your lookup value: Click on the cell where you will type the ID or name you are searching for (e.g., cell E2).
  2. Start the formula: In the cell where you want the result to appear, type =XLOOKUP(.
  3. Select the lookup value: Click the cell containing the value you are searching for (e.g., E2), then type a comma.
  4. Select the lookup array: Highlight the column in your main data table that contains the IDs. For example, click and drag from A2 to A100. Type a comma.
  5. Select the return array: Highlight the column that contains the names you want to retrieve. For example, click and drag from B2 to B100.
  6. Close and Enter: Type a closing parenthesis ) and press Enter. The formula should look like this: =XLOOKUP(E2, A2:A100, B2:B100).

Method 2: Using VLOOKUP (For Older Excel Versions)

  1. Organize your data: Ensure the unique identifier (the ID) is in the leftmost column of your data range. VLOOKUP cannot look to the left.
  2. Start the formula: In the result cell, type =VLOOKUP(.
  3. Select the lookup value: Click the cell containing the value you are searching for (e.g., E2), then type a comma.
  4. Select the table array: Highlight the entire range of your data table, including both the ID column and the name column (e.g., A2:B100). Type a comma.
  5. Enter the column index number: Type the number of the column that contains the name, counting from the left. If IDs are in column A and names are in column B, type 2. Type a comma.
  6. Set the match type: Type FALSE to ensure Excel finds an exact match.
  7. Close and Enter: Type a closing parenthesis ) and press Enter. The formula should look like this: =VLOOKUP(E2, A2:B100, 2, FALSE).

Common Mistakes

  • Wrong Column Order (VLOOKUP): Attempting to use VLOOKUP when the name is to the left of the ID. VLOOKUP only searches the first column of the selected range.
  • Forgetting "FALSE" in VLOOKUP: If you omit the FALSE (or 0) at the end of a VLOOKUP, Excel defaults to an "Approximate Match," which often returns the wrong name if the list isn't sorted alphabetically.
  • Including Headers in the Range: While not always fatal, including the header row in your lookup range can sometimes cause errors or slow down very large spreadsheets.
  • Mismatched Data Types: Searching for a number (ID 101) in a column where the IDs are formatted as text. Excel treats "101" and 101 as different values.

Tips

  • Use Absolute References: If you plan to drag your formula down to look up multiple names, use dollar signs to lock your ranges (e.g., $A$2:$A$100). You can do this by pressing F4 while the range is highlighted in the formula bar.
  • Named Ranges: Instead of highlighting A2:A100, you can name that range "EmployeeIDs" via the Name Box (top left). Your formula becomes much easier to read: =XLOOKUP(E2, EmployeeIDs, EmployeeNames).
  • Data Validation: Create a dropdown menu in your lookup cell (Data > Data Validation > List) so you can select IDs from a list rather than typing them manually.

Troubleshooting

If your formula is not returning the correct name, try these steps in order:

  1. Check for Leading/Trailing Spaces: A common issue is a hidden space after a name (e.g., "John " instead of "John"). Use the =TRIM() function to clean your data.
  2. Verify Data Types: Ensure both the lookup value and the source column are formatted the same (both as "General" or both as "Text").
  3. Check for #N/A Error: This means Excel cannot find the value. Double-check that the ID actually exists in the source column.
  4. Check for #REF! Error: This usually happens in VLOOKUP if your column index number is larger than the number of columns you selected in your range.
  5. Update the Range: If you added new names to the bottom of your list, ensure your formula range (e.g., A100) has been expanded to include the new rows.

Frequently Asked Questions

Can I look up a name using two different criteria?

Yes. XLOOKUP can handle this by using the ampersand (&) to join criteria. For example: =XLOOKUP(E2&F2, A2:A100&B2:B100, C2:C100) to look up a name based on both First Name and Last Name.

What is the difference between XLOOKUP and VLOOKUP?

XLOOKUP is more flexible; it can look to the left, defaults to an exact match, and doesn't require you to count columns. VLOOKUP only looks to the right and requires a specific column index number.

How do I stop the #N/A error from showing when the cell is empty?

Wrap your formula in the IFERROR function. For example: =IFERROR(VLOOKUP(E2, A2:B100, 2, FALSE), "Name Not Found"). This replaces the error with your own custom text.

Can I look up names across different sheets?

Yes. When selecting your lookup and return arrays, simply click over to the other worksheet tab and highlight the columns there. Excel will automatically add the sheet name to the formula.

Is there a way to look up names without using formulas?

Yes, you can use the "Filter" feature (Data > Filter) to search for a specific name or ID, or use a Pivot Table to organize and find names within a large dataset.