Hi All,
Formatting issue with a macro.
Report with dates formatted as dd.mm.yyyy is changed by
Columns("G:G").Select
Selection.Replace What:=".", Replacement:="/", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.NumberFormat = "dd/mm/yyyy;@"
Columns("A:N").Select
Selection.Sort Key1:=Range("G2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("B1").Select
BUT, on some cells, the format of the date = mm/dd/yyyy.
Subsequently my sort is incorrect. Seriously going bald over this one.
Any help much appreciated.
Cheers
John
Bookmarks