Patriot2879
Well-known Member
- Joined
- Feb 1, 2018
- Messages
- 1,259
- Office Version
- 2010
- Platform
- Windows
Hi please can you help me, i have the code below where i have named a range A28:C41 but the last row might not always be C41 please can you advise how i do a last row please?
Code:
With ActiveSheet.Sort
.SortFields.Add Key:=Range("A28"), Order:=xlAscending
.SortFields.Add Key:=Range("B28"), Order:=xlAscending
.SetRange Range("A28:C41")
.Header = xlYes
.Apply
End With