Drop Down List with Specific Values Based on Selection

Anonymous
2020-04-05T01:15:10+00:00

I am trying to create a kind of booking form that will have values attached to certain selections from a drop down list.

ie. I have a drop down list that includes:

  • adult day pass
  • adult Half day pass
  • child day pass
  • child half day pass

And I want each of those selections to have a value attached to it. So when I select 'adult day pass' $60 will appear in the cell next to it, when I select 'adult half day pass' $45 appears in the cell next to it etc.

Does this require complicated formulas/coding?

Thanks

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2020-04-05T03:03:28+00:00

    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:

    1. 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.

    1. Now is a good time to Sort data in a range or table in your drop-down list.
    1. Select the cell in the worksheet where you want the drop-down list. In my case, I select D2.
    2. 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.

    1. On the Settings tab, in the Allow box, click List.
    2. 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.

    1. Select a blank cell that you want to auto populate the corresponding value. In my case, I select E2.
    2. 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.

    1. 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

    28 people found this answer helpful.
    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2020-04-05T02:55:34+00:00

    Hi

    Please, try this method

    1- Create a table anywhere on your workbook like the one in the picture below

    2 - Use the formula 

    in cell B2 =VLOOKUP(A2,$E$1:$F$5,2,FALSE) and copy/drag down

    Change ranges according to your scenario.

    Here a video from one of the masters that will give you more details and ideas for your goals.

    https://www.youtube.com/watch?v=iJ1MO2xx8wQ&t=305s

    Do let us know if you need more help

    Regards

    Jeovany

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2020-04-07T22:47:20+00:00

    Hi DingbatEri,

    Have you checked the above replies? Please let us know if you need further assistance.

    Best regards,

    Madoc

    0 comments No comments
  3. Anonymous
    2020-04-11T00:13:23+00:00

    Hi Madoc,

    Thank you for your reply! I had a go step by step and the last section where I put the formula in it comes up with "#N/A". Not sure if I'm doing it wrong?

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2020-04-12T20:50:45+00:00

    Hi DingbatEri,

    Thanks for your update. Per the situation you mentioned, the file may help us better understand and try to fix the issue. Could you prepare and upload an example file you mentioned with no confidential/ sensitive data to OneDrive, then share the link to me via PM? I'd like to have a test from my side.

    Best regards,

    Madoc

    0 comments No comments