kweaver
Well-known Member
- Joined
- May 12, 2009
- Messages
- 2,940
- Office Version
- 365
What is wrong with this?
lastrow is set (e.g., it's 100), there are headers in row 4.
The error is that the "sort reference is not valid."
lastrow is set (e.g., it's 100), there are headers in row 4.
The error is that the "sort reference is not valid."
Code:
Worksheets("Reformatted").Range("A4:L" & lastrow).Sort Key1:=Range("H4"), Order1:=xlAscending, Header:=xlYes