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 29 30 31 32 33
|
Sub test()
Dim i As Integer
Dim k As Integer
Dim derli As Integer
Dim cel As Range
Dim sh As Worksheet
Dim x As String
Dim recherche As Range
x = "YES"
k = 8
Set sh = Worksheets("data")
With sh
For Each cel In sh.Range("v5:v" & sh.Range("v5").End(xlDown).Row)
Set recherche = cel.Find(x)
Next cel
End With
derli = Columns(1).Find("*", , , , , xlPrevious).Row
For i = 5 To derli
If Cells(i, 22).Value = x Then
sh.Range("a&i, n&i, o&i, al&i, ad&i, ae&i, af&i, ag&i, ah&i, ai&i, am&i, an&i, ao&i, ar&i, as&i, at&i, ak&i, aj&i, m&i").Select
Selection.Copy
Worksheets("Fully Redeemed").Activate
Cells(k, 1).Activate
ActiveSheet.Paste
End If
Next i
i = i + 1
k = k + 1
End Sub |
Partager