Eurekaonide
Active Member
- Joined
- Feb 1, 2010
- Messages
- 433
Hi All
I have the below code;
Range("W:W").Replace what:=".", replacement:="/"
It is just going down one column and replacing 01.12.2019 for example to 01/12/2019
but each time I run the code it randomly changes the format in some cells to date instead of text or general and then some of the dates get populated as 12.01.2019 which is a completely different date!
Ive tried setting the formats before and after, I e tried setting the formats in the replace code as true or false and the search formats but nothing stops it. Ironically if I do it manually its fine its just when its done via VBA.
Any suggestions please?
Thanks
I have the below code;
Range("W:W").Replace what:=".", replacement:="/"
It is just going down one column and replacing 01.12.2019 for example to 01/12/2019
but each time I run the code it randomly changes the format in some cells to date instead of text or general and then some of the dates get populated as 12.01.2019 which is a completely different date!
Ive tried setting the formats before and after, I e tried setting the formats in the replace code as true or false and the search formats but nothing stops it. Ironically if I do it manually its fine its just when its done via VBA.
Any suggestions please?
Thanks