Variable List Name Validation

EB08

Active Member
Joined
Jun 9, 2008
Messages
343
In short, I'm assigning a variable to a cell that will house the name of a list as text that I want to use for data validation. The problem i'm coming accross is how to then use the variable in data validation syntax to set the text in the "=listname" portion of data validation. for example:

test = Range("l11")

Range("L18").vaidation.Add Type:=xlValidateList,_ AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=test"

What i'm trying to do is have the text in range("L11") enter into the red portion above as the name of a list. Any ideas? Thanks again!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,202,917
Messages
6,052,557
Members
444,592
Latest member
fauxlidae

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