Hi DingbatEri,
Let’s say you have created a drop down list based on values in range A2:A5. When selecting value in the drop down list, you want the corresponding values in range B2:B5 to be automatically populated in a specific cell. For example, when you select Adult Half Day Pass from the drop down, the corresponding price $45 will be populated in E2 as the below screenshot shown. You can use the XLOOKUP function to meet your goal.
Here are the detailed steps:
- In a new worksheet, type the entries you want to appear in your drop-down list. Then you can quickly convert your list to a table by selecting any cell in the range, and pressing Ctrl+T.
**Notes:**1) Why should you put your data in a table? When your data is in a table, then as you add or remove items from the list, any drop-downs you based on that table will automatically update. You don't need to do anything else.
- Now is a good time to Sort data in a range or table in your drop-down list.
- Select the cell in the worksheet where you want the drop-down list. In my case, I select D2.
- Go to the Data tab on the Ribbon, then Data Validation.
Note: If you can’t click Data Validation, the worksheet might be protected or shared. Unlock specific areas of a protected workbook or stop sharing the worksheet, and then try step 3 again.
- On the Settings tab, in the Allow box, click List.
- Click in the Source box, then select your list range. In my case, I select A2:A5 or input the title of the column directly. If it’s OK for people to leave the cell empty, check the Ignore blank box. Check the In-cell dropdown box. Click OK.
- Select a blank cell that you want to auto populate the corresponding value. In my case, I select E2.
- Copy and paste the below formula into it, and then press the Enter key.
=XLOOKUP(D2,A2:A5 ,B2:B5) or =XLOOKUP(D2,Title ,Price)
Note: In the formula, the D2 is the drop down list CELL, A2:A5 is the table range includes the lookup value, and B2:B5 is the table range includes the lookup results. Learn more about XLOOKUP: XLOOKUP function.
- From now on, when you select a name in the drop down list, E2 will be auto-populated with a specific number. We can manually format E2 as currency.
Best regards,
Madoc