Q:

find & replace vba changes format of date

I have a range of cells with dates, that contain values that have to be replaced. Once I do that using general Find & Replace - it works smoothly. When I do it in VBA, the formatting of the cells is changed and dates are converted to a wrong ones, e.g. 12/10/2015 (12 October), but become 10/12/2015 (10 December). Here's the code: 
Sub find_replace()
ActiveSheet.Range("T1", Range("T1").End(xlToRight).Offset(0, -2)).Select
With Selection
.NumberFormat = "dd/mm/yyyy"
.Replace What:="P.", Replacement:="", LookAt:=xlPart,     SearchOrder:=xlByColumns, MatchCase:=False, SearchFormat:=False,   ReplaceFormat:=False
.Replace What:=".", Replacement:="/", LookAt:=xlPart,    SearchOrder:=xlByColumns, MatchCase:=False, SearchFormat:=False,    ReplaceFormat:=False
End With
End Sub

Please be so kind as to advise how to get rid of this annoying issue. Thanks.

A:

Date() I'm Italian and always quarrel with the date..
If the date that you want convert is alway like P.01.10.2015 to 1th Oct
try the code below, otherwise change the start/end of right(x,x),mid(x,x,x)
Sub find_replace()
Dim cell As Range
Dim yr As String, mnt As String, dy As String
Dim d As Date
For Each cell In ActiveSheet.Range("T1", Range("T1").End(xlToRight).Offset(0, -2))
yr = Right(cell, 4)
mnt = Mid(cell, 6, 2)
dy = Mid(cell, 3, 2)
d = DateSerial(yr, mnt, dy)
Range(cell.Address) = d
Next cell
End Sub

