pick3

piter

Active Member
Joined
Jul 22, 2011
Messages
316
Office Version
  1. 2016
Platform
  1. Windows
Please help me in the following =
Create a planilia in Excel, to create pairs with the smallest to the largest digit
Example 457 = pair with the smallest and largest digit = 47. But obeying the three positions in pick3
In the example under 4 digits 1 and is positioned higher in the 3rd position, the digit
In the middle goes like this case is 4:07 = 5.6. gave 5
= 749 Another example is the smallest 4-digit top nine of the pair taking the 2nd position and three
The seventh digit was between 4 and 9 = 5,6,7,8
Purpose of the macro is to create pairs in three positions pick3 rotation with the lowest and highest digit
The third digit is the lowest and highest type OK to filter the smaller more
Use the registration of designs and see the positions of the lower frequencies for more
It may just be ok to create the macro. thanks
pick3
1 st 2 nd 3 rd
4 5 7
7 8 9 ...
here's the list of registered sweepstakes picks opçap copy and paste or type!
 
Code:
Sub test()
With Range("A1:A4096")
    .Formula = "=TEXT(DEC2OCT(ROW()-1),""0000"")"
    .Copy
    .PasteSpecial xlPasteValues
    .TextToColumns Destination:=Range("A1"), DataType:=xlFixedWidth, _
        FieldInfo:=Array(Array(0, 1), Array(1, 1), Array(2, 1), Array(3, 1))
End With
End Sub
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Need help with Excel formula.

I have a spreadsheet with pick 3 combinations.

In cells H20:J20 I have the digits 1 4 3

In cells H21:J21 I have the digits 4 4 0

I would like to find out how many digits repeated from the previous drawing.

The previous drawing in this case was 4 4 0.

So the answer should be 1 because the 4 repeated.

2 0 3
3 4 2

Answer would be 2. The 2 and the 3 repeated from the previous drawing 3 4 2.

If anyone could help it would be greatly appreciated!!

Thanks
 
Upvote 0
Hello hot pepper, the formula is like this, but for 6-cell, is ok for another game
Switch to = 000000 222222
That is the following formula to add up to 6 cells and in the limit = 2
Sub all_comb ()
'macro to create all comb switch to 0000-5555 from 000,000 to 222,222
Ln = 1 'at line 1 display start
For w = 0 To 5: For x = 0 To 5: For y = 0 To 5: For z = 0 To 5
Cells (Ln, 1) = w: Cells (Ln, 2) = x: Cells (Ln, 3) = y: Cells (Ln, 4) = z
Ln = Ln + 1 'move down to next line
Z Next: Next y: x Next: Next w 'complete loops
end Sub
 
Upvote 0
Hello, hot pepper, the formula was now so precise example, have to change to = 000000-222222
It has increased the cells for 6-cell is the last conbinçao = 222,222 ie the limit is 2
The rest is all the same! thanks
 
Upvote 0
Hello, hotpepper, I could not change the formula for these values ​​= 000000 to 222222
It's for another lottery, ok, to see please
For six cells, this formula down this good, but I need for another lottery
It is this same change to values ​​from 000,000 to 222,222
For six (6) cells) ok
Sub test ()
With Range ("A1: A4096")
. Formula = "= TEXT (DEC2OCT (ROW () -1)," "0000" ")"
. Copy
. PasteSpecial xlPasteValues
. TextToColumns Destination: = Range ("A1"), DataType: = xlFixedWidth, _
FieldInfo: = Array (Array (0, 1), Array (1, 1), Array (2, 1), Array (3, 1))
end With
end Sub
 
Upvote 0
Hello, can someone help me please, the above formula is to change the values ​​for
000000-222222 ok AFormulate cells and 6 is equal to the above, but for other lottery
 
Upvote 0
Code:
Sub Test()
Dim maxLength As Long, maxNum As Long
maxNum = 2: maxLength = 6
With Range("A1:A" & Bas2Bas(String(maxLength, CStr(maxNum)) + 0, maxNum + 1, 10))
    .Formula = "=TEXT(Bas2BAS(ROW(),," & maxNum + 1 & ")," & Chr(34) & String(maxLength, "0") & Chr(34) & ")"
    .Copy
    .PasteSpecial xlPasteValues
    .TextToColumns Destination:=Range("A1"), DataType:=xlFixedWidth, _
        FieldInfo:=Array(Array(0, 1), Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array _
        (5, 1), Array(6, 1), Array(7, 1), Array(8, 1), Array(9, 1)), TrailingMinusNumbers:=True
End With
End Sub
Public Function Bas2Bas(Number As String, Optional ByVal FromBase As Byte = 10, Optional ByVal ToBase As Byte = 16) As String
    Const BaseDigits As String = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    Dim MyResult As String
    Dim dRemainder As Double
    Dim MyPlace As Byte
    Dim MyDigit As Byte
    Dim dValue As Long
    On Error Resume Next
     
    Number = UCase(Number)
    If (ToBase < 2) Or (ToBase > 36) Then GoTo Done
     
    For MyPlace = 1 To Len(Number)
        For MyDigit = 0 To 36
            If MyDigit >= FromBase Then GoTo Done
            If Mid(BaseDigits, MyDigit + 1, 1) = Mid(Number, MyPlace, 1) Then Exit For
        Next
        dValue = dValue + MyDigit * FromBase ^ (Len(Number) - MyPlace)
    Next
     
    Do
        dRemainder = dValue - (ToBase * Int((dValue / ToBase)))
        MyResult = Mid(BaseDigits, dRemainder + 1, 1) & MyResult
        dValue = Int(dValue / ToBase)
    Loop While (dValue > 0)
Done:
    Bas2Bas = MyResult
End Function

The Bas2Bas UDF was from here: http://www.ozgrid.com/forum/showthread.php?t=74484&page=1
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,741
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top