The cell doesn't have the format but it is mirroring the format from the regional settings. Check Control Panel | Clock and Region | Region. The moment you replace the text, it becomes a date and then it simply picks up the format from regional settings.
Try this
With Range("D1")
.NumberFormat = "@"
.Value = Replace(.Value, ".", "/")
End With
What I am doing here is converting the format of the cell to text and then replacing the characters.
Great, it works! But can I also replace "." with "/" in the entire column D with this method without using a loop? If yes how? Thank you – Masca2056 7 mins ago
Try this. I am assuming 10 is the last row.
Sub Sample()
Columns(4).NumberFormat = "@"
[D1:D10] = [INDEX(SUBSTITUTE(D1:D10,".","/"),)]
End Sub
See this LINK for an explanation of using the above method.