shakethingsup
Board Regular
- Joined
- May 21, 2017
- Messages
- 64
- Office Version
- 365
- Platform
- Windows
Hello, I'm learning about sort through vba.
I want to sort by column E in descending order. So I used this code where lastrow is the last row in the spreadsheet that has data:
Range("A4:K" & lastrow).Sort key1:=Range("E4:E" & lastrow), order1:=xlDescending, Header:=xlNo
The problem is, it sorts column E but doesn't sort the remaining columns with it. Logan started with a total owed amount of 912.55 and now owes 1524.75.
What am I not understanding here? thank you!
I want to sort by column E in descending order. So I used this code where lastrow is the last row in the spreadsheet that has data:
Range("A4:K" & lastrow).Sort key1:=Range("E4:E" & lastrow), order1:=xlDescending, Header:=xlNo
The problem is, it sorts column E but doesn't sort the remaining columns with it. Logan started with a total owed amount of 912.55 and now owes 1524.75.
What am I not understanding here? thank you!