I have the code below which was working fine
until i realised that the list of items is going to be longer that the current range but I don't know how big it might get.
Is there an easy way to amend the code to identify that last row with something in column A and then select the range from A12 to BD (whatever the last row is).
I've had a go with a few things I have found on the internet but don't really know what I am doing.
Thanks in advance for any help
HTML:
Application.ScreenUpdating = False
Range("A12:BD30").Select
Range("BD30").Activate
ActiveWorkbook.Worksheets("Employer Database").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Employer Database").Sort.SortFields.Add Key:=Range _
("B12:B30"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Employer Database").Sort
.SetRange Range("A12:BD30")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("B12").Select
Application.ScreenUpdating = True
End Sub
until i realised that the list of items is going to be longer that the current range but I don't know how big it might get.
Is there an easy way to amend the code to identify that last row with something in column A and then select the range from A12 to BD (whatever the last row is).
I've had a go with a few things I have found on the internet but don't really know what I am doing.
Thanks in advance for any help