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
| Sub Vierge()
Dim i As Byte, j As Long, Lig As Integer
Dim Mot As String, firstAddress As String
Dim Plage As Range, c As Range
Mot = InputBox("Mot à rechercher ?")
If Mot = "" Then Exit Sub
'Selectionne la zone de recherche du mot
Set Plage = Range(Sheets("Empl").Range("J8"), Sheets("Empl").Range("J65536").End(xlUp))
'selectionne la ligne du début du récapitulatif (à partir quelle ligne on va pouvoir insérer les données)
Lig = Sheets("Vierge").Range("A65536").End(xlUp).Row + 1
For Each c In Plage
If InStr(1, c, Mot) <> 0 Then
c.EntireRow.Range("A1:G1").Copy Sheets("Vierge").Cells(Lig, 1)
Lig = Lig + 1
End If
Next c
Sheets("Vierge").Activate
Range("A17").Activate
Application.ScreenUpdating = True
End With
End Sub |
Partager