怎样用EXCEL制作彩( 五 )


    intXyh(3) = frmCp.txtXyh3.Value '幸运号
    If intXyh(1) = 0 And intXyh(2) = 0 And intXyh(3) = 0 Then
        Sheets("选号").Range("Xyh") = True
        Exit Sub
    If
    For i = 1 To 3
        If intXyh(i) = 0 Then x(i) = True
    Next
    For i = 1 To intMzhs
        intTemp = Sheets("选号").Cells(1, i)
        For j = 1 To 3
            If intXyh(j) - intTemp = 0 Then x(j) = True
        Next j
        If x(1) = True And x(2) = True And x(3) = True Then
            Sheets("选号").Range("Xyh") = True
            Exit Sub
        If
    Next
    Sheets("选号").Range("Xyh") = False
Sub
Public Sub 判定解除号()
    Dim intPch(3) As Integer, intMzhs As Integer
    Dim x(3) As Boolean, i As Integer, intTemp As Integer
    Dim j As Integer
    
    For i = 1 To 3
        x(i) = True
    Next
    intMzhs = frmCp.txtMzhs.Value   '每注号数
    intPch(1) = frmCp.txtPch1.Value '解除号
    intPch(2) = frmCp.txtPch2.Value '解除号
    intPch(3) = frmCp.txtPch3.Value '解除号
    If intPch(1) = 0 And intPch(2) = 0 And intPch(3) = 0 Then
        Sheets("选号").Range("Pch") = True
        Exit Sub
    If
    For i = 1 To 3
        If intPch(i) = 0 Then x(i) = True
    Next
    For i = 1 To intMzhs
        intTemp = Sheets("选号").Cells(1, i)
        For j = 1 To 3
            If intPch(j) - intTemp = 0 Then x(j) = False
        Next j
    Next
    If x(1) = True And x(2) = True And x(3) = True Then
        Sheets("选号").Range("Pch") = True
    Else
        Sheets("选号").Range("Pch") = False
    If
Sub
Public Sub 排序()
    Sheets("选号").Range("1:1").Select
    Selection.Sort Key1:=Range("A1"), Order1:=xlAscing, Header:=xlNo, _
            OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight, SortMethod _
            :=xlPinYin
Sub
Public Sub 连号()
    Dim intMzhs As Integer
    Dim i As Integer
    intMzhs = frmCp.txtMzhs.Value   '每注号数
    With Sheets("选号")
        If frmCp.opt1.Value = https://vvvtt.com/article/True Then '不考虑连号
            .Range("Lianhao") = True
            Exit Sub
        If
        
        If frmCp.opt2.Value = https://vvvtt.com/article/True Then '二连号
            For i = 1 To intMzhs - 1
                If .Cells(1, i + 1) - .Cells(1, i) = 1 Then

推荐阅读