I want to have some data validations for the given range ( D2:D65536 ).
The validation criteria must check the cells within the range must not be empty and the text length should not more than 35.
How to implement this validation using vba?
I have tried:
' With Range("D2:D65536").Validation
' .Delete
' .Add Type:=xlValidateTextLength, _
' AlertStyle:=xlValidAlertInformation, _
' Minimum:=2, Maximum:="35"
' .IgnoreBlank = True
' .ErrorTitle = "Validation Error"
' .ErrorMessage = "X mandatory and length should be less than or equal to 35"
' .ShowError = True
' End With