I have writen code to sort data in Descending order on sheets "Overaged Inventory"
However when running the macro, I get a message, "The sort reference is not valuid.... "
The data to be sorted in in Col I
It would be appreciated if someone could kindly amend my code
However when running the macro, I get a message, "The sort reference is not valuid.... "
The data to be sorted in in Col I
It would be appreciated if someone could kindly amend my code
Code:
Sub Sort_Ageing_Overaged()
Dim Lr As Long
With Sheets("Overaged inventory")
Lr = Cells(.Rows.Count, "A").End(xlUp).Row
.Range("a2:K" & Lr).Sort Key1:=Range("I1" & Lr), Order1:=xlDescending
End With
End Sub