Sub test()
Dim col As Integer
Dim c As Integer
Dim der_col As Integer
Dim cell As Integer
Dim n As Integer
Dim commande As Sheets
Dim Nrf As Variant
der_cell = Cells.SpecialCells(xlCellTypeLastCell).Column
c = 5
n = 2
Nrf = 1
With ActiveSheet
For cell = 5 To der_cell
If ((Cells(2, c).Value) - 1) <= Cells(2, c).Value Then
Sheets(Nrf).Select
Cells(2, c) = 1
c = c + 1
n = n + 2
Else
Sheets(Nrf).Select
Cells(2, c) = 0
End If
Nrf = Nrf + 1
Next
End With
End Sub