How to create an answer based on the user clicking on an option in a drop-down list?

livinlavidaloca

New Member
Joined
Aug 9, 2022
Messages
7
Office Version
  1. 365
Platform
  1. Windows
  2. Web
I want to create a drop down list where they can select from lots of options, then once they select an option, the cell beside it will provide a unique value of my choice.

For example, in the below table, I'd like to make it so that I call the cell 'Maintenance' then when you click the cell it will list all of the below options, then depending on which option you click on it will provide you with the cost code as seen on the right.

Is it possible?

Thank you in advance!

Maint Materials: Services (Rec VAT)5620-4500
Maint: Externals (Rec VAT)5620-4600
Maint Materials: Externals (Rec VAT)5620-4700
Maint: Landscaping (Rec VAT)5620-4800
Maint Materials: Landscaping (Rec VAT)5620-4900
Maint: Pests (Rec VAT)5620-5000
Maint: Out of Hours (Rec VAT)5620-5100
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
If I'm understanding your question correctly, you could do something like this:

Compare and highlight.xlsx
AB
1ServiceCode
2Maint Materials: Services (Rec VAT)5620-4500
3Maint: Externals (Rec VAT)5620-4600
4Maint Materials: Externals (Rec VAT)5620-4700
5Maint: Landscaping (Rec VAT)5620-4800
6Maint Materials: Landscaping (Rec VAT)5620-4900
7Maint: Pests (Rec VAT)5620-5000
8Maint: Out of Hours (Rec VAT)5620-5100
9Select One 
10Select One 
11Select One 
12Select One 
13Select One 
14Select One 
15Select One 
16Select One 
17Select One 
18Select One 
19Select One 
20Select One 
Sheet1
Cell Formulas
RangeFormula
B2:B20B2=IFS(A2="Maint Materials: Services (Rec VAT)","5620-4500",A2="Maint: Externals (Rec VAT)","5620-4600",A2="Maint Materials: Externals (Rec VAT)","5620-4700",A2="Maint: Landscaping (Rec VAT)","5620-4800",A2="Maint Materials: Landscaping (Rec VAT)","5620-4900",A2="Maint: Pests (Rec VAT)","5620-5000",A2="Maint: Out of Hours (Rec VAT)","5620-5100",A2="Select One","")
Cells with Data Validation
CellAllowCriteria
A2:A20ListSelect One,Maint Materials: Services (Rec VAT),Maint: Externals (Rec VAT),Maint Materials: Externals (Rec VAT),Maint: Landscaping (Rec VAT),Maint Materials: Landscaping (Rec VAT),Maint: Pests (Rec VAT),Maint: Out of Hours (Rec VAT)
 
Upvote 0
1. SWITCH would be preferable to IFS
2. Even so, this answer is limited because you have the data hardcoded in the formula so does not allow you to add other options

How about just creating a table using MATCH to find the row and then INDEX to find the desired value
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top