Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
HowTo:Validation Formula = Array of strings
How do I code cell's validation formula to contain a string of values that
may contain commas? i.e. cells(1,1).validation.formula1="""1,000"",""2,000" ",""3,000""" Expected to result 1,000 2,000 3,000 Instead I get 1 000 2 000 3 000 Thanks I have the following values A B 1 9/7,000 C 2 10/10,000 B 3 12/32,000 C I have a function GetLimitList() in code Function GetLimitList(Filter as string) as String() GetLimitList = <MyLogic End Function Results in Array(9/7,000,12/32,000) I then perform With Names(NamedRange).RefersToRange .Validation.Delete .Validation.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:=Join(GetLimitList("C"), ",") .Validation.IgnoreBlank = True .Validation.InCellDropdown = True .Validation.InputTitle = "" .Validation.ErrorTitle = "" .Validation.InputMessage = "" .Validation.ErrorMessage = "" .Validation.ShowInput = True .Validation.ShowError = True End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HOWTO: What is the formula to have evaluate a range of value | Excel Discussion (Misc queries) | |||
Array of Strings | Excel Discussion (Misc queries) | |||
How do I find the number of elements in an Array of Strings? | Excel Programming | |||
Counting Strings in an Array | Excel Programming | |||
Passing array of strings from DLL function to VBA | Excel Programming |