I want to replace “-” character by “.” inside cells that contain date information.
With the code below, this is obtained in cells with text format, but not with date:
Worksheets("Sheet1").Columns("A").Replace _ What:="-", Replacement:=".", _ SearchOrder:=xlByColumns, MatchCase:=True
I can I do this but to cells with date format?
With Sheets("Sheet1") .Cells(1, 1).CurrentRegion.Columns(1).NumberFormat = "mm.dd.yyyy;@" End With
Leave the dates as dates that you can calculate against rather than converting them to text that are useless beyond a visual representation of an actual date.