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
| Sub test()
'Réf. 130203.xlsm
Dim Plage As Range, C As Range, Ligne As Long
With Sheets("Feuil1")
Set Plage = .[A1].CurrentRegion.Resize(, 1)
Ligne = Plage.Rows.Count
For Each C In Plage
C.Offset(, 27).Formula = "=COUNTIFS(" & Plage.Offset(, 1).Address & "," & .Cells(C.Row, 2).Address & "," & _
Plage.Offset(, 2).Address & "," & .Cells(C.Row, 3).Address & "," & Plage.Offset(, 3).Address & _
"," & .Cells(C.Row, 4).Address & "," & Plage.Offset(, 4).Address & "," & .Cells(C.Row, 5).Address & ")"
Next C
For i = Ligne To 1 Step -1
If .Cells(i, 1) < 0 And .Cells(i, 28) > 1 Then
.Cells(i, 1).EntireRow.Delete
End If
Next i
Ligne = Plage.Rows.Count
For i = Ligne To 1 Step -1
If .Cells(i, 28) > 1 Then
.Cells(i, 1).EntireRow.Delete
End If
Next i
.Columns(28).Delete
End With
End Sub |
Partager