How to create a dynamic data validation from a table based on criteria

GlobalTraveler

New Member
Joined
Oct 2, 2014
Messages
1
I have the following table.

United StatesHong KongIndia
Job GradePer HourPer DayPer HourPer DayPer HourPer Day
USDUSDHKDUSDINRUSD
P 1,600 12,800 - 24,150 3,145
D1 1,000 8,000 6,950 7,158 -
D2 900 7,200 6,250 6,437 17,850 2,325
SM1 - - -
SM2 - - -
M 700 5,600 5,200 5,356 -
AM1 500 4,000 3,350 3,450 9,450 1,231
AM2 - - -
S1 - - -
S2 - - -
S3 350 2,800 3,000 3,090 -
S4 280 2,240 2,750 2,832 -
A1 175 1,400 1,000 1,030 6,300 821
A2 135 1,080 1,000 1,030 -

<tbody>
</tbody><colgroup><col span="7"></colgroup>


I have a combo box (CB1) that uses a Dynamic Named Range of the Country Names as a Data Validation so the list would be and would expand dynamically as I added countries to the right

CB1
----------------------
United States
Hong Kong
India

In another combo box (CB2) where I want to have a dynamic data validation that lists on the Job Grades that have a USD Per Day amount for the selected Country.

So for example if in CB1 the user selects India then the Data Validation in CB2 would be:

CB2
----------------------
P
D2
AM1
A1

Notice the list contains only those job grades where the USD Per Day is blank (or could also use 0, I don't care what we compare againt blank or 0 as I can set the USD amount to either).

Just as the Named Range I use for CB1's data validation is dynamic and expands as colums are added to the right I would like this combo box data validation to also be dynamic and expand right as columns (countries) or down as rows (Job Grades) are added.

FYI: I usually use OFFSET in my dynamic named ranges instead of INDEX so that I don't have to worry about sorting, etc.

Thanks
 
Last edited:

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,215,430
Messages
6,124,852
Members
449,194
Latest member
HellScout

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