ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,731
- Office Version
- 2007
- Platform
- Windows
I have the following code in use.
I have a table of which is Row 1 headers,then the value start in row 2 then down the page.
Columns are A-K
Column G are dates & at present they are sorted OLD to NEW then down the page.
How do i edit the code shown so the dates are sprted NEW to OLD please
I tried to add Ascending / Descending etc but got in a mess so posted what currently works for me.
Thanks
I have a table of which is Row 1 headers,then the value start in row 2 then down the page.
Columns are A-K
Column G are dates & at present they are sorted OLD to NEW then down the page.
How do i edit the code shown so the dates are sprted NEW to OLD please
I tried to add Ascending / Descending etc but got in a mess so posted what currently works for me.
Thanks
VBA Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Worksheets("RANGER").Range("D2").ClearContents
Range("G2").CurrentRegion.Sort Key1:=Range("G2"), Header:=xlYes
End Sub