Hi,
I'm using a validation list to present a dropdown list to the end user which is straight forward. However the data that is pulled into the dropdown will vary in the number of rows each day.
I'd like to be able to automate the last row value into the validation.
I can display the last row via...
Dim Lastrow As Long
Sheets("Ind Summary").Select
Lastrow = Range("K65536").End(xlUp).Row
LastrowK = "K" & Lastrow
Application.ScreenUpdating = False
With Range("I2")
.Value = LastrowK
However I can't get see how to incorporate LastrowK into the following
With Range("D6").Validation
.Delete
.Add xlValidateList, xlValidAlertStop, xlBetween, "=$K$2:$K$542"
.InCellDropdown = True
End With
Any help or advice greatly received
I'm using a validation list to present a dropdown list to the end user which is straight forward. However the data that is pulled into the dropdown will vary in the number of rows each day.
I'd like to be able to automate the last row value into the validation.
I can display the last row via...
Dim Lastrow As Long
Sheets("Ind Summary").Select
Lastrow = Range("K65536").End(xlUp).Row
LastrowK = "K" & Lastrow
Application.ScreenUpdating = False
With Range("I2")
.Value = LastrowK
However I can't get see how to incorporate LastrowK into the following
With Range("D6").Validation
.Delete
.Add xlValidateList, xlValidAlertStop, xlBetween, "=$K$2:$K$542"
.InCellDropdown = True
End With
Any help or advice greatly received