BNGO 5 同伴数字
BNGO 5 の どの番号どうしが組み合わさって出現しているか集計して見ました。
(133回分集計 緑色、赤色で大体の出現状況を表示してます)
・申し込みカードから見るグループ数字
・集計表 (1~133回)
・データ集計は左のデータ表から右の集計表を作成
・マクロ
ロト6のマクロをもとに改造
2.LOTO6SLJ - 趣味のエクセルで当てようロト・ナンバーズ
Sub BINGO5同伴数字()
Dim i As long, kaigo As long
Range("n3:BA42").Select
Selection.ClearContents
Selection.FormatConditions.Delete ’条件付き書式削除(自動記録)
saikeisanoff
i = 3
Do Until Cells(i, 3) = ""
For a = 1 To 7 '1,2,3,4,5,6,7,8
xa = Cells(i, 2) '最初数字
ya = Cells(i, a + 2) '次回以降数字
Cells(ya + 2, xa + 13) = Cells(ya + 2, xa + 13) + 1
Cells(xa + 2, ya + 13) = Cells(xa + 2, ya + 13) + 1
Next a
For b = 1 To 6 '2,3,4,5,6,7,8
xa = Cells(i, 3) '2回数字
ya = Cells(i, b + 3)
Cells(ya + 2, xa + 13) = Cells(ya + 2, xa + 13) + 1
Cells(xa + 2, ya + 13) = Cells(xa + 2, ya + 13) + 1
Next b
For c = 1 To 5 '3,4,5,6,7,8
xa = Cells(i, 4) '3回数字
ya = Cells(i, c + 4)
Cells(ya + 2, xa + 13) = Cells(ya + 2, xa + 13) + 1
Cells(xa + 2, ya + 13) = Cells(xa + 2, ya + 13) + 1
Next c
For d = 1 To 4 '4,5,6,7,8
xa = Cells(i, 5) '4回数字
ya = Cells(i, d + 5)
Cells(ya + 2, xa + 13) = Cells(ya + 2, xa + 13) + 1
Cells(xa + 2, ya + 13) = Cells(xa + 2, ya + 13) + 1
Next d
For e = 1 To 3 '5,6,7,8
xa = Cells(i, 6) '5回数字
ya = Cells(i, e + 6)
Cells(ya + 2, xa + 13) = Cells(ya + 2, xa + 13) + 1
Cells(xa + 2, ya + 13) = Cells(xa + 2, ya + 13) + 1
Next e
For f = 1 To 2 '6,7,8
xa = Cells(i, 7) '6回数字
ya = Cells(i, f + 7)
Cells(ya + 2, xa + 13) = Cells(ya + 2, xa + 13) + 1
Cells(xa + 2, ya + 13) = Cells(xa + 2, ya + 13) + 1
Next f
'7,8回数字
xa = Cells(i, 8)
ya = Cells(i, 9)
Cells(ya + 2, xa + 13) = Cells(ya + 2, xa + 13) + 1
Cells(xa + 2, ya + 13) = Cells(xa + 2, ya + 13) + 1
i = i + 1
If i = 1500 Then Exit Do
Loop
kaigo = 0
kaigo = Application.CountA(Range(Cells(3, 3), Cells(1500, 3)))
Cells(1, 24) = kaigo
saikeisanon
Range("N3:BA42").Select’条件付き書式設定(自動記録)
Selection.FormatConditions.AddAboveAverage
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
Selection.FormatConditions(1).AboveBelow = xlAboveAverage
With Selection.FormatConditions(1).Font
.Color = -16752384
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13561798
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Selection.FormatConditions.AddAboveAverage
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
Selection.FormatConditions(1).AboveBelow = xlBelowAverage
With Selection.FormatConditions(1).Font
.Color = -16383844
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13551615
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
End Sub
saikeisannon saikeisanoff は
マクロのスピードアップ - 趣味のエクセルで当てようロト・ナンバーズ
変数 知らなかった本当の使い方 - 趣味のエクセルで当てようロト・ナンバーズ