notuserfriendly
Programmer
Hi
I'm trying to write a sub or function that handles
validation on all cells in a specific column.
I would like to skip the hardcoding as in the example
And change the range to a column, but the range only accepts it in this format, when trying it with Columns it doesn't work since the validation requires a range.
Is there a way to code it so that Excel knows which is the last row? without using a findlastrow?
Anybody?
I'm trying to write a sub or function that handles
validation on all cells in a specific column.
I would like to skip the hardcoding as in the example
Code:
With Range("e5").Validation
.Add Type:=xlValidateWholeNumber, _
AlertStyle:=xlValidAlertInformation, _
Minimum:="5", Maximum:="10"
.InputTitle = "Integers"
.ErrorTitle = "Integers"
.InputMessage = "Enter an integer from five to ten"
.ErrorMessage = "You must enter a number from five to ten"
End With
Is there a way to code it so that Excel knows which is the last row? without using a findlastrow?
Anybody?