Hello Forum,
I'm trying to code multiple validations in single cell using VBA (Excel 2007).
Currently validation checks to see if the data entered is between 1 and (N number of characters)
ie. between 1 and 30
Here's code:
.Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="1", Formula2:=CStr(arrAttrs(x).AttributeLength)
The problem is: Users are entering a single SPACE in the cell and its passing validation.
I need to add another validation to stop users from entering single SPACE in cell.
The cell has to be either BLANK or contain data within length specified by first validation formula.
How do I go about adding this second validation to range?
I've seen that CUSTOM type option can be used, but not sure how to code it.
Any help would be greatly appreciated.
MsBecca
Bookmarks