Data Validation list based on cell input

Jeffrey Mahoney

Well-known Member
Joined
May 31, 2015
Messages
2,776
Office Version
  1. 365
Platform
  1. Windows
I want to create a formula inside a data validation to provide a list of values based on the input in a cell. I have a table of hazards (below named "Hazards2_tbl"). When the user selects H2S I want the data validation to lookup the named range from the hazard table, which in this case is "Chem1_list" and show the list of entries from the Chem1_list named range.



Unknown
CDE
3AbbreviationFull NameMagnitude 1 List
4#2 Deprop CHG#2 Depropanizer ChargeChem1_list
5#2 Deprop FD#2 Depropanizer FeedChem1_list
6#2 Deprop RFLX#2 Depropanizer RefluxChem1_list
7H2SAcid Gas, Hydrogen Sulfide Rich GasChem1_list
8ASOAcid Soluable OilChem1_list
9AlkylateAlkylateChem1_list
10Alky Debut FDAlkylation Debutanizer FeedChem1_list
11Alky Debut O/HAlkylation Debutanizer OverheadChem1_list
12Alky Debut RFLXAlkylation Debutanizer RefluxChem1_list
13Alky Deprop FDAlkylation Depropanizer FeedChem1_list
14Alky Deprop O/HAlkylation Depropanizer OverheadChem1_list
15Alky Deprop RFLXAlkylation Depropanizer RefluxChem1_list
16NH3AmmoniaChem1_list
17Sour GasAmmonia/Hydrogen Sulfide Rich GasChem1_list
18AntifoamAntifoamChem1_list
19BFWBoiler Feed WaterSteam1_list
Lists




I've tried using =INDIRECT(VLOOKUP(F12,Hazards2_tbl,3,FALSE)); where F12 contains H2S
 
Last edited:

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hello Jeffery,

Add this Data Validation (List) formula to cell $A$4 and drag it down.

=INDIRECT(OFFSET($A4,0,2,1,1))
 
Last edited:
Upvote 0
So, I think I didn't fully explain my need...

On one sheet I have users filling out a form. One of the fields on that form is a hazard that they choose from a list (from the abbreviation column C above). The next two fields need to be dynamic data validation lists based on the choice in the hazard field called Mag1 and Mag2. The list chosen for Mag1 is found by name on the hazard table column E (Magnitude 1 List).

So.. if the user chooses H2S in the hazard field, Mag1 data validation should return the list of values in the named range Chem1_list. If the user chooses BFW in the hazard field, Mag1 data validation should return the list of values in the named range Steam1_list.

I was hoping that I could use a formula in the Mag1 data validation that would dynamically choose which list to return.

I was playing around with some options and I found out something about dynamic named ranges. I could be wrong, but it looks like INDIRECT will NOT work with dynamic names ranges. I will work with hard coded named ranges.

The formula I used before: =INDIRECT(VLOOKUP(F12,Hazards2_tbl,3,FALSE)) will work to return a range only if the range is not dynamic.

Does anybody else have a solution?

Jeff
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,797
Members
449,048
Latest member
greyangel23

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