Automatically Return Company and Type from a Name Drop-Down in Excel
Question details
Automatically display the company and type associated with a name selected from a drop-down list.

- Product
- Microsoft Excel or WPS Spreadsheets
- Device & OS
- not provided
- Scenario
- A worksheet has a name drop-down and neighboring columns for the matching company and type.
- Observed behavior
- The company and type should update when the selected name changes.
Create a source list with Name, Company, and Type in separate columns, and make sure the drop-down names match the source names. Each name should be unique; otherwise, a lookup returns the first match.
Use VLOOKUP to Fill Company and Type
Use this approach in Excel or WPS Spreadsheets when your source list has names in its first column.
This example assumes the drop-down is in A2 and the source list is on Sheet2, with Name, Company, and Type in columns A, B, and C.
Open Sheet2 and place the source names in A2:A100, companies in B2:B100, and types in C2:C100. Adjust the ranges in the formulas if your list is larger.
On the sheet with the drop-down, select B2 and enter =IF(A2="","",IFERROR(VLOOKUP(A2,Sheet2!$A$2:$C$100,2,FALSE),""))
Select C2 and enter =IF(A2="","",IFERROR(VLOOKUP(A2,Sheet2!$A$2:$C$100,3,FALSE),""))
Select a name from the drop-down in A2. Check that B2 and C2 show its company and type, then select another name to verify that both values update.

Use XLOOKUP with an Excel Source Table
Use XLOOKUP when your Excel version supports it and the source data is in a table.
Fill Company and Type Automatically in WPS Spreadsheets
Use VLOOKUP in WPS Spreadsheets to retrieve company and type values whenever a name is selected from your drop-down list.
- 1. Open your workbook: Open the workbook in WPS Spreadsheets and locate the sheet containing the name drop-down.
- 2. Arrange the source data: On Sheet2, place names, companies, and types in columns A, B, and C, respectively.
- 3. Add the lookup formulas: If the drop-down is in A2, enter =IF(A2="","",IFERROR(VLOOKUP(A2,Sheet2!$A$2:$C$100,2,FALSE),"")) in B2 and =IF(A2="","",IFERROR(VLOOKUP(A2,Sheet2!$A$2:$C$100,3,FALSE),"")) in C2.
- 4. Select a name: Use the drop-down in A2 to select a name and confirm that its company and type appear in B2 and C2.

Frequently Asked Questions
How do I create the name drop-down?
Select the input cell, open Data > Data Validation or Validation, and choose a list source containing the names. The exact menu label may vary by spreadsheet version.
Why are the company and type cells blank?
Check that a name is selected in A2, that it matches a name in the source list, and that the formula's source range includes that name. The example formulas suppress lookup errors by returning a blank.
What happens if two people have the same name?
VLOOKUP and XLOOKUP return the first matching name. Use a unique identifier in the drop-down and source list if duplicate names need different results.
Can I use the formulas for more than one drop-down row?
Yes. Copy the formulas in B2 and C2 down alongside the other drop-down cells. The A2 reference changes for each row, while the dollar signs keep the VLOOKUP source range fixed.




