ナンバーズ4 桁別次数字
4桁の各桁出現出目と次回の出現出目をペア表示して出現パターンを見ます。
表の様に5の後に7が3回出てましたが当選番号で見ると下の様になります。
5112回 4259
5113回 4072
5117回 0952
5118回 9572
5122回 2515
5123回 5717
再現性は低いですがストレートを狙う時に参考になれば良いかも知れませんね?
マクロは分かりにくいですが下記の様にしています。
Sub next4number() '次数字を表示する
On Error GoTo errorcheck
Call saikeisanoff '再計算を止めて計算を速くする・
Dim nenum(4) As String, stopnum As long
Call saikeisanon
bangoend = Sheets("ストレートパターン").Cells(2, 15)
Range("b12") = "=ストレートパターン!D4&ストレートパターン!D5"
Range("c12") = "=ストレートパターン!E4&ストレートパターン!E5"
Range("d12") = "=ストレートパターン!F4&ストレートパターン!F5"
Range("e12") = "=ストレートパターン!G4&ストレートパターン!G5"
Range("f12") = "=SMALL(ストレートパターン!D4:G4,1)&SMALL(ストレートパターン!D4:G4,2)&SMALL(ストレートパターン!D4:G4,3)&SMALL(ストレートパターン!D4:G4,4)"
Range("b12:f12").Copy Range(Cells(13, 2), Cells(bangoend + 11, 6))
Range(Cells(13, 2), Cells(bangoend + 11, 6)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
kaigo = Application.InputBox("開始回号番号入力して下さい")
If kaigo <= 0 Then End
kaigo = kaigo + 10
Range(Cells(kaigo, 7), Cells(kaigo + 4000, 106)).Select
Selection.ClearContents
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
stopnum = Cells(10, 1) + 1
i = kaigo '12
Call saikeisanoff
Do Until Cells(i, 1) = Cells(10, 1) + 1
For n = 1 To 4 '百十一に分ける。
setretu = Cells(i, 1 + n).Value '番号によりデータ記入位置を設定する。
Cells(i, setretu + 7) = Cells(i, 1 + n)
nenum(n) = Cells(i, 1 + n)
If n = 1 Then
Cells(i, setretu + 7).Select
With Selection.Font
.Color = -16776961
Selection.Font.Bold = True
End With
ElseIf n = 2 Then
Cells(i, setretu + 7).Select
With Selection.Font
.Color = -11489280
End With
If nenum(n - 1) = nenum(n) Then
With Selection.Interior
.PatternColorIndex = xlAutomatic
.Color = 10092543
Selection.Font.Underline = xlUnderlineStyleDouble
End With
End If
ElseIf n = 3 Then
Cells(i, setretu + 7).Select
With Selection.Font
.ThemeColor = xlThemeColorAccent6
Selection.Font.Underline = xlUnderlineStyleDouble
End With
If nenum(n - 1) = nenum(n) Or nenum(n - 2) = nenum(n) Then
With Selection.Interior
.PatternColorIndex = xlAutomatic
.Color = 10092543
Selection.Font.Underline = xlUnderlineStyleDouble
End With
End If
Else
Cells(i, setretu + 7).Select
With Selection.Font
.Color = 2
Selection.Font.Underline = xlUnderlineStyleSingle
End With
If nenum(n - 3) = nenum(n) Or nenum(n - 2) = nenum(n) Or nenum(n - 1) = nenum(n) Then
With Selection.Interior
.PatternColorIndex = xlAutomatic
.Color = 10092543
End With
End If
End If
Next n
i = i + 1
If i = stopnum + 10 Then Exit Do
Loop
Call saikeisanon '再計算をオンにする・
Exit Sub
errorcheck:
MsgBox ("ありません。チェックして下さい"): End
End Sub
saikeisanoff や saikeisanon は別のマクロを呼び出してます。
上表のようにストレートとボックスでのまとめた表を作っても良いと思います。
途中までマクロを作りましたが投げ出してましたw
これも全体と任意の間隔(100回etc)での集計が出来れば参考になると思います。
出現パターンは集中する時と拡散するときと、やや同じ間隔になる時が有ると思います。
集中する時や同じ間隔になりそうなときは狙い目かも知れませんね?