1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Sub booleens()
Dim mot As String, i, j, var$
mot = "0"
nb_total_systeme = 6
nb_systeme = 4
Do While Len(mot) <= nb_total_systeme
If InStr(mot, "0") <> 0 Then
mot = Left(mot, InStr(mot, "0") - 1) & "1" & Right(mot, Len(mot) - InStr(mot, "0"))
var = Right(String(nb_total_systeme, "0") & mot, nb_total_systeme)
i = i + 1
For j = 1 To nb_total_systeme
Cells(j, i) = Mid(var, j, 1)
Next
Else
mot = "1" & String(Len(mot), "0")
var = Right(String(nb_total_systeme, "0") & mot, nb_total_systeme)
i = i + 1
For j = 1 To nb_total_systeme
Cells(j, i) = Mid(var, j, 1)
Next
End If
Loop
End Sub |
Partager