I am using the following short macro to assign Data Validation as a list of characters:
Sub DVList()
With ActiveCell.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="a,b,c,d"
.IgnoreBlank = True
End With
End Sub
The macro works.
I want to modify the macro to include the comma character in the list. I don't see how to do this because the comma is the list separator.
Am I stuck having to use worksheet cells to build the list??
,
... – LS_ᴅᴇᴠ"a,b"
is absolutely the same as"a"&Chr(44)&"b"
... But I noticed now: you are disregarding VBA. – LS_ᴅᴇᴠCHAR
instead ofChr
. Keep in mind that you can useChr
when you want to insert a unsupported character in VBA strings.,
doesn't apply, it is valid within strings. Problem is that is a list separator. – LS_ᴅᴇᴠ