1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Sub test4()
Dim c As Range, Ligne As Long
Ligne = 24
Set sh = Sheets("tableau de bord")
With Sheets("fichier")
For Each c In .Range(.[A2], .Cells(.Cells.Rows.Count, 1).End(xlUp))
If .Cells(c.Row, "N") = 2 And .Cells(c.Row, "O") = "" Then
sh.Cells(Ligne, 2) = .Cells(c.Row, "A")
sh.Cells(Ligne, 3) = .Cells(c.Row, "K")
sh.Cells(Ligne, 4) = .Cells(c.Row, "L")
sh.Cells(Ligne, 5) = .Cells(c.Row, "AM")
sh.Cells(Ligne, 6) = .Cells(c.Row, "AN")
Ligne = Ligne + 1
End If
Next c
End With
End Sub |
Partager