I have a cell within my spreadsheet that will conditionally have data validation properties based on user input. The validation property will be a list with numbers ranging between 0+. The range of the list will depend on user input. As the list will contain only whole numbers, I was wondering if there is a way I can simply set a min and max value and have excel fill-in the numbers between. Something like:
That way, I could simply set the max to follow the value of a certain cell:
Is this possible? If not, is there a way to convert this"
from Excel to VBA code? That would be my plan b.
Code:
Range("A1").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, _
AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="0 To 51"
That way, I could simply set the max to follow the value of a certain cell:
Code:
xlBetween, Formula1:="0 To Range("A1").value
Is this possible? If not, is there a way to convert this"
Code:
=OFFSET($J$3,0,0,(ROWS($J$3:$J$25)-COUNTBLANK($J$3:$J$25)),1)