1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| Sub Test()
Dim LigDeb As Long, LigFin As Long
Dim DteDeb As Date
Dim c As Range
Application.ScreenUpdating = False
With Worksheets("Feuil1")
DteDeb = DateAdd("yyyy", -1, Date)
Set c = .Range("A:A").Find(DteDeb, LookIn:=xlFormulas, Lookat:=xlWhole)
If Not c Is Nothing Then
LigDeb = c.Row
Set c = .Range("A:A").Find(Date, LookIn:=xlFormulas, Lookat:=xlWhole)
If Not c Is Nothing Then
LigFin = c.Row
Set c = Nothing
.Range("B" & LigDeb & ":E" & LigFin - 1).Copy .Range("B" & LigFin)
End If
End If
End With
End Sub |
Partager