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
| Sub Copy()
Dim MaRecherche_debut As Range
Dim MaRecherche_fin As Range
Dim Fin_colonne As Long
Dim Plage_copie As Range
With ThisWorkbook.Sheets("Feuil1").Cells
Set MaRecherche_debut = .Find(What:="Input Filter", LookIn:=xlValues, SearchDirection:=xlNext)
End With
With ThisWorkbook.Sheets("Feuil1").Cells
Set MaRecherche_fin = .Find(What:="Input Filter", LookIn:=xlValues, SearchDirection:=xlPrevious)
End With
'Debug.Print MaRecherche.Address
Fin_colonne = MaRecherche_debut.End(xlToRight).Column
Set Plage_copie = Range(MaRecherche_debut.Address, Cells(MaRecherche_fin.Row, Fin_colonne))
Plage_copie.Copy Destination:=Worksheets("Feuil2").Range("E1")
End Sub |
Partager