Hello,
I am trying to sort my worksheet with the follow code and I keep getting an error "This formula is missing a range reference or a defined name." on this line of my code:
Here is my entire code:
Ideally if I were to manuall sort this, this is how I would do it but I would like to automate it as much as possible
I am trying to sort my worksheet with the follow code and I keep getting an error "This formula is missing a range reference or a defined name." on this line of my code:
VBA Code:
Range("A1").CurrentRegion.Sort Key1:=("Absolute Value"), Order1:=xlDescending, Header:=xlYes
Here is my entire code:
VBA Code:
With ActiveSheet.Sort
.SortFields.Clear
Range("A1").CurrentRegion.Sort Key1:=("Description"), Order1:=xlAscending, Header:=xlYes
Range("A1").CurrentRegion.Sort Key1:=("Absolute Value"), Order1:=xlDescending, Header:=xlYes
Range("A1").CurrentRegion.Sort Key1:=("Transaction Code"), Order1:=xlAscending, Header:=xlYes
Range("A1").CurrentRegion.Sort Key1:=("QuarterSerial"), Order1:=xlAscending, Header:=xlYes
Ideally if I were to manuall sort this, this is how I would do it but I would like to automate it as much as possible