Vous utilisez un navigateur obsolète. Il se peut que ce site ou d'autres sites Web ne s'affichent pas correctement. Vous devez le mettre à jour ou utiliser un navigateur alternatif.
Boostez vos compétences Excel avec notre communauté !
Rejoignez Excel Downloads, le rendez-vous des passionnés où l'entraide fait la force.
Apprenez, échangez, progressez – et tout ça gratuitement !
👉 Inscrivez-vous maintenant !
Sub test()
Dim nbLignes As Long, i As Long
With ThisWorkbook.Sheets("Feuil1")
nbLignes = .Range("E" & .Rows.Count).End(xlUp).Row
For i = 10 To nbLignes
If IsDate(.Range("E" & i)) Then
If Year(.Range("E" & i)) = 2020 Then .Range("E" & i) = DateSerial(2010, Month(.Range("E" & i)), Day(.Range("E" & i)))
End If
Next i
End With
End Sub
Option Explicit
Sub test()
Dim c As Range
Application.ScreenUpdating = False
For Each c In Range("E10:E" & Range("E65536").End(xlUp).Row)
If IsDate(c) Then
If Year(c) = 2020 Then c = DateSerial(2010, Month(c), Day(c))
End If
Next c
Application.ScreenUpdating = True
End Sub
- Navigue sans publicité - Accède à Cléa, notre assistante IA experte Excel... et pas que... - Profite de fonctionnalités exclusives Ton soutien permet à Excel Downloads de rester 100% gratuit et de continuer à rassembler les passionnés d'Excel. Je deviens Supporter XLD