When analyzing data in Excel there are a lot of dates that I pull into the worksheet in the dd.mm.yyyy
format. I want to convert these dates to a dd/mm/yyyy
format.
When doing this manually (ctrl+f => replace . by /)
Excel gives me the correct European dates. When using a macro Excel gives me American dates whenever the day is equals 12 or lower and European dates when the day is above 12.
The macro used is the regular search and replace macro (it has even been recorded to make sure that it does the exact same this as when I am recording the macro). When recording the macro, Excel gives me European dates and when running it a mix between European and American dates):
Range("A1:A7").Select
Selection.Replace What:=".", Replacement:="/", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Manually replacing gives me following output:
01.08.2019
05.08.2019
15.08.2019
01.09.2019
06.09.2019
10.10.2019
11.10.2019
=>
01/08/2019
05/08/2019
15/08/2019
01/09/2019
06/09/2019
10/10/2019
11/10/2019
=> European to European
Using the exact same (recorded or written) macro excel gives me the following output
01.08.2019
05.08.2019
15.08.2019
01.09.2019
06.09.2019
10.10.2019
11.10.2019
=>
08/01/2019
08/05/2019
15/08/2019
09/01/2019
09/06/2019
10/10/2019
10/11/2019
=> European to mix of American and European
I am replacing this manually for months now and cannot incorporate any date replacing macros in my code.