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 Traiter()
Dim N As Long, i As Long, j As Long
Dim N1 As Double, N2 As Double
Dim Tb, Res()
Application.ScreenUpdating = False
With Worksheets("Feuil1")
N = .Cells(.Rows.Count, 2).End(xlUp).Row
If N > 1 Then
Tb = .Range("B2:C" & N)
ReDim Res(1 To N - 1, 1 To 2)
For i = 1 To N - 1
N1 = Tb(i, 1)
N2 = Tb(i, 2)
If N1 > 0.7916666666667 And N1 < 0.29 Or N2 < 6 Then
j = j + 1
Res(j, 1) = N1
Res(j, 2) = N2
End If
Next i
.Range("B2:C" & N) = Res
End If
End With
End Sub |
Partager