Sub Convertir_Dates()
Dim i As Long, j As Long, c As Long
Dim DerLig As Long, DerCol As Long
Dim f As Worksheet
Application.ScreenUpdating = False
For i = 1 To Sheets.Count
Set f = Sheets(i)
DerLig = f.Range("A" & Rows.Count).End(xlUp).Row - 1
DerCol = f.Range("A3").End(xlToRight).Column
For c = 1 To DerCol
If Left(f.Cells(3, c), 4) = "DATE" Then
For j = 4 To DerLig
If Not IsDate(f.Cells(4, c)) Then
If Len(f.Cells(j, c)) = 7 Then
f.Cells(j, c) = CDate(Left(f.Cells(j, c), 1) & "/" & Mid(f.Cells(j, c), 2, 2) & "/" & Right(f.Cells(j, c), 4) * 1)
ElseIf Len(f.Cells(j, c)) = 8 Then
f.Cells(j, c) = CDate(Left(f.Cells(j, c), 2) & "/" & Mid(f.Cells(j, c), 3, 2) & "/" & Right(f.Cells(j, c), 4) * 1)
End If
End If
Next j
End If
Next c
Next i
Set f = Nothing
End Sub