Frage makros excel
1 Antworten zur Frage
Videos zum Thema
Frage zu makros bei excel
ich möchte ein makro erstellen der ähnlich wie bei den Lottokombinationen alle kombis anzeigt.
nun will ich nicht alle zahlen von 6 aus 49 sondern
8 gruppen jeweils 1 2 3 was kommen kann und davon eine liste mit allen möglichkeiten.
hier ein beispiel:
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
3
3
3
3
3
3
3
3
1
2
2
2
2
2
2
2
usw halt alle möglichen kombinationen
Sub Kombinationen()
Dim a, b, c, d, e, f, g, h, i As Integer
i = 1
For a = 1 To 3
For b = 1 To 3
For c = 1 To 3
For d = 1 To 3
For e = 1 To 3
For f = 1 To 3
For g = 1 To 3
For h = 1 To 3
Cells = a
Cells = b
Cells = c
Cells = d
Cells = e
Cells = f
Cells = g
Cells = h
i = i + 1
Next
Next
Next
Next
Next
Next
Next
Next
End Sub