ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,738
- Office Version
- 2007
- Platform
- Windows
Evening,
I have two macros of which one sorts column G Ascending & the other Descending.
The column in question is date format.
The code in use is supplied below.
I use the same code for both & just changed one to Descending etc.
My problem is that cell G4 when Descending is incorrect, Ascending is fine.
Example
G4 =18/09/2017
G5 =03/11/2017
G6 =30/10/2017
G7 =27/09/2017
One thing i did notice is the date in cell G4 shows an upside down v before the date where other cells just show the date,if that helps.
I have two macros of which one sorts column G Ascending & the other Descending.
The column in question is date format.
The code in use is supplied below.
I use the same code for both & just changed one to Descending etc.
My problem is that cell G4 when Descending is incorrect, Ascending is fine.
Example
G4 =18/09/2017
G5 =03/11/2017
G6 =30/10/2017
G7 =27/09/2017
One thing i did notice is the date in cell G4 shows an upside down v before the date where other cells just show the date,if that helps.
Code:
Private Sub SortDateoldnew_Click()
Dim x As Long
Application.ScreenUpdating = False
With Sheets("HONDA LIST")
If .AutoFilterMode Then .AutoFilterMode = False
x = .Cells(.Rows.Count, 1).End(xlUp).Row
.Range("A3:G" & x).Sort Key1:=Range("G4"), Order1:=xlAscending, Header:=xlGuess
End With
ActiveWorkbook.Save
Application.ScreenUpdating = True
Sheets("HONDA LIST").Range("A4").Select
End Sub
Last edited: