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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
| Sub resumer()
'----------------------------
Sheets("1 à 25").Select
Set Plage = Range("A10:A59")
For Each Cellule In Plage
If Cellule.Offset(0, 5) <> 0 Then
Cellule.Offset(0, 0).Select
Cellule.Offset(0, 0).Copy
Sheets("resume").Select
Do
ActiveCell.Offset(2, 0).Activate
Loop Until IsEmpty(ActiveCell)
ActiveSheet.Paste
End If
Next Cellule
Sheets("1 à 25").Select
Set Plage = Range("A10:A59")
For Each Cellule In Plage
If Cellule.Offset(0, 5) <> 0 Then
Cellule.Offset(0, 3).Select
Cellule.Offset(0, 3).Copy
Sheets("resume").Select
Do
ActiveCell.Offset(0, 2).Activate
Loop Until IsEmpty(ActiveCell)
ActiveSheet.Paste
End If
Next Cellule
'--------------------------------
Sheets("1 à 25").Select
Set Plage = Range("A10:A59")
For Each Cellule In Plage
If Cellule.Offset(1, 5) <> 0 Then
Cellule.Offset(0, 0).Select
Cellule.Offset(0, 0).Copy
Sheets("resume").Select
Do
ActiveCell.Offset(0, 0).Activate '--> bug ici je pense
Loop Until IsEmpty(ActiveCell)
ActiveSheet.Paste
End If
Next Cellule
Sheets("1 à 25").Select
Set Plage = Range("A10:A59")
For Each Cellule In Plage
If Cellule.Offset(1, 5) <> 0 Then
Cellule.Offset(1, 3).Select
Cellule.Offset(1, 3).Copy
Sheets("resume").Select
Do
ActiveCell.Offset(0, 3).Activate
Loop Until IsEmpty(ActiveCell)
ActiveSheet.Paste
End If
Next Cellule
End Sub |
Partager