Excel VBA Customised Validation List

TykiMikk

New Member
Joined
May 14, 2018
Messages
1
I'm trying to create a customised dropdownlist with Validation and I'm theorising and want to know if this is possible


edyjN.png

In the red highlight box FLEALLSTAFF I'm wanting to combine all the values where Region = FLE or Region = ALL


I'm trying to do this by using a For Loop and comparing each cell to see if Region = FLE or Region = ALL. If it does then add it to the NameRange (NameRangeOfFLEAKLStaff).


If that's possible then in the source of my dropdown list I want to use the following code:


IF((AND(C5 = "BEC",C5 = "FEC"),StaffAKLCHC,=OFFSET(STAFF!$A$1,MATCH($C$5,STAFF!$A:$A,0)-1,1,COUNTIF(STAFF!$A:$A,$C$5),1)


The code above will check if C5 is BEC or FEC, If it's true then it will use the source from the named range StaffAKLCHC else it will use my formula which just finds the source from the staff tab.


C5 is a cell that changes depending on what I select in the region drop down list


IF(B2="FLE",B2,(IF(B2="BEC",B2,"ALL")))


meaning if the selection in the region drop down list is FLE or BEC then C5 will be FLE or BEC if not then it will be ALL


Here is the link for the dummy workbook: https://mega.nz/#!y8NSEA7T!2OvEQxvMDLZMp4u5FB5gZ6xhP-xs3ZP47gYMipcUZcM
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,225,327
Messages
6,184,300
Members
453,227
Latest member
Slainte

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