
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Dim rCell As Range
Dim valore
Set rng = Intersect(Me.Columns("A"), Target) '<<==("A")da cambiare secondo tue esigenze'
If Not rng Is Nothing Then
For Each rCell In rng.Cells
With rCell
If Not IsEmpty(.Value) Then
valore = Target.Value
.Offset(0, 1).Value = Format(Left(valore, 2) & "/" & Mid(valore, 3, 2) & "/" & Right(valore, 4), "mm/dd/yyyy")
Else
.Offset(0, 1).Value = vbNullString
End If
End With
Next rCell
End If
End Sub |
