Format dates from specific column

kbenjamin827

New Member
Joined
Jul 5, 2018
Messages
17
Hi all,

I am working with pivot tables, and the imported data always comes in as dd.mm.yyyy is there a way to create a macro that formats specific columns from dd.mm.yyyy to mm/dd/yyyy?f
 

WaterGypsy

Well-known Member
Joined
Jan 15, 2010
Messages
697
Can't you just set the format of the data in the pivot table itself?
 

kbenjamin827

New Member
Joined
Jul 5, 2018
Messages
17
I believe the changes need to be made at the source. I know what youre referring to but it is not working
 

WaterGypsy

Well-known Member
Joined
Jan 15, 2010
Messages
697
you could try something like this - it depends on where your data is

Code:
Dim sSplit

    sSplit = split(Range("a1"), ".")
    
    Range("b1").Value = DateSerial(sSplit(2), sSplit(1), sSplit(0))
 

Forum statistics

Threads
1,082,557
Messages
5,366,304
Members
400,882
Latest member
zaldy_a

Some videos you may like

This Week's Hot Topics

Top