no domace ulohy zo skoly casto nerobim :)) ale dnes som sa nudil tak som sa nato kukol a aj tak to nieje dokoncene
ked chces tu mas dobry start
- je to len nahodne priradenie cisla k dnu
- neopakuju sa
Sub test()
Dim aNummer As Integer
Dim NumCheck As Boolean
Dim num1A As Boolean
Dim num2B As Boolean
Dim num3C As Boolean
Dim num4D As Boolean
Dim num5E As Boolean
Dim num6X As Boolean
Dim num7X As Boolean
NumCheck = False
num1A = False
num2B = False
num3C = False
num4D = False
num5E = False
num6X = False
num7X = False
For x = 6 To 370
Do While NumCheck > True
aNummer = Int((7 - 1 + 1) * Rnd + 1)
Select Case aNummer
Case 1
If num1A = False Then
Cells(x, 3) = "A"
num1A = True
NumCheck = True
End If
Case 2
If num2B = False Then
Cells(x, 3) = "B"
num2B = True
NumCheck = True
End If
Case 3
If num3C = False Then
Cells(x, 3) = "C"
num3C = True
NumCheck = True
End If
Case 4
If num4D = False Then
Cells(x, 3) = "D"
num4D = True
NumCheck = True
End If
Case 5
If num5E = False Then
Cells(x, 3) = "E"
num5E = True
NumCheck = True
End If
Case 6
If num6X = False Then
Cells(x, 3) = "X"
num6X = True
NumCheck = True
End If
Case 7
If num7X = False Then
Cells(x, 3) = "X"
num7X = True
NumCheck = True
End If
End Select
If num1A = True And num2B = True And num3C = True And num4D = True And num5E = True And num6X = True And num7X = True Then
num1A = False
num2B = False
num3C = False
num4D = False
num5E = False
num6X = False
num7X = False
End If
Loop
NumCheck = False
Next
End Sub
citovat
ked chces tu mas dobry start
- je to len nahodne priradenie cisla k dnu
- neopakuju sa
Sub test()
Dim aNummer As Integer
Dim NumCheck As Boolean
Dim num1A As Boolean
Dim num2B As Boolean
Dim num3C As Boolean
Dim num4D As Boolean
Dim num5E As Boolean
Dim num6X As Boolean
Dim num7X As Boolean
NumCheck = False
num1A = False
num2B = False
num3C = False
num4D = False
num5E = False
num6X = False
num7X = False
For x = 6 To 370
Do While NumCheck > True
aNummer = Int((7 - 1 + 1) * Rnd + 1)
Select Case aNummer
Case 1
If num1A = False Then
Cells(x, 3) = "A"
num1A = True
NumCheck = True
End If
Case 2
If num2B = False Then
Cells(x, 3) = "B"
num2B = True
NumCheck = True
End If
Case 3
If num3C = False Then
Cells(x, 3) = "C"
num3C = True
NumCheck = True
End If
Case 4
If num4D = False Then
Cells(x, 3) = "D"
num4D = True
NumCheck = True
End If
Case 5
If num5E = False Then
Cells(x, 3) = "E"
num5E = True
NumCheck = True
End If
Case 6
If num6X = False Then
Cells(x, 3) = "X"
num6X = True
NumCheck = True
End If
Case 7
If num7X = False Then
Cells(x, 3) = "X"
num7X = True
NumCheck = True
End If
End Select
If num1A = True And num2B = True And num3C = True And num4D = True And num5E = True And num6X = True And num7X = True Then
num1A = False
num2B = False
num3C = False
num4D = False
num5E = False
num6X = False
num7X = False
End If
Loop
NumCheck = False
Next
End Sub
citovat