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
| Option Explicit
Sub parcours_et_copie()
Dim a As Integer
Dim c As Range
Dim firstAddress As String
Dim ligne As Integer
Dim mavar
a = 42
Range("M30").Select
With Worksheets("Feuil1").Range("M32:M80")
mavar = "*"
Set c = .Find(mavar, LookIn:=xlValues, Lookat:=xlPart) '
If Not c Is Nothing Then
firstAddress = c.Address
Do
ligne = c.Row
Range("y" & a) = Range("M" & ligne)
a = a + 1
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End Sub |
Partager