1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| Sub test()
Dim Col As Integer, Col2 As Integer
''''''''''
Sheets("Janvier-Juillet").Select
Columns("D:D").Select 'remplace .rows(4)
Selection.Find(What:=Date, After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Col = ActiveCell.Row
''''''''''
Columns("D:D").Select
Selection.Find(What:=DateAdd("d", 20, Date), After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Col2 = ActiveCell.Row
'''''''''''
Sheets("Janvier-Juillet").Range("d" & Col & ":d" & Col2).Select
Selection.Copy Destination:=Sheets("Impression").Range("Z4")
End Sub |
Partager