Sub NombreVersDate()
Dim P As Range, tablo, i&, x$
With ActiveSheet
If .FilterMode Then .ShowAllData
Set P = .UsedRange.Columns(1)
End With
tablo = P.Resize(, 2)
Application.ScreenUpdating = False
P.NumberFormat = "dd/mm/yyyy"
For i = 1 To UBound(tablo)
x = tablo(i, 1)
If x Like "########" Then
x = Right(x, 2) & "/" & Mid(x, 5, 2) & "/" & Left(x, 4)
If IsDate(x) Then tablo(i, 1) = CDate(x) Else P(i).NumberFormat = "General"
Else
P(i).NumberFormat = "General"
End If
Next
P = tablo
End Sub
Sub DateVersNombre()
Dim P As Range, tablo, i&, x
With ActiveSheet
If .FilterMode Then .ShowAllData
Set P = .UsedRange.Columns(1)
End With
tablo = P.Resize(, 2)
For i = 1 To UBound(tablo)
x = tablo(i, 1)
If IsDate(x) Then tablo(i, 1) = Format(x, "yyyymmdd")
Next
Application.ScreenUpdating = False
P.NumberFormat = "General"
P = tablo
End Sub