+ Reply to Thread
Results 1 to 13 of 13

3 lottery to find out how long it has been since a lottery number hit

  1. #1
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,175

    3 lottery to find out how long it has been since a lottery number hit

    3 lottery to find out how long it has been since a lottery number hit at positon1 (A2) position 2 (B2) & position 3 (C2) and I have also included a column beginning with (D2) that will tell me how long it has been since a number hit @ any position
    https://www.excelforum.com/attachmen...1&d=1581082305
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,175

    Re: 3 lottery to find out how long it has been since a lottery number hit

    each day new draws will be placed within the 30 draws, that is, update, so the macro has to do automatic when changing for new pick3 in the list

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: 3 lottery to find out how long it has been since a lottery number hit

    Try such code:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Best Regards,

    Kaper

  4. #4
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,175

    Re: 3 lottery to find out how long it has been since a lottery number hit

    hello thanks for viewing the post but we have a problem, the digit 9 is present in the 1st position 4 times and the macro shows once, can you fix it?

  5. #5
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,175

    Re: 3 lottery to find out how long it has been since a lottery number hit

    hello,KAPER,please the digit, zero (0) appears 3 times in the 1st position, but it is marked 12
    * can you fix?

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: 3 lottery to find out how long it has been since a lottery number hit

    Show expected results. In my opinion calculation works perfect. See schematic picture
    Attached Images Attached Images

  7. #7
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: 3 lottery to find out how long it has been since a lottery number hit

    in b2 copy to d11
    =IFERROR(MATCH($A2,L$2:L$31,0),"not found")
    in e2
    =MIN(B2:D2) and copy down

    or if(MIN(B2:D2)=0,"not found",MIN(B2:D2))

  8. #8
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,175

    Re: 3 lottery to find out how long it has been since a lottery number hit

    the KAPER macro must count each time each of the 10 digits was drawn separately, for example the digit 9 was drawn 4 in the column or 1st position, and the table shows one, it is not pairs of digits but each
    * separate

  9. #9
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: 3 lottery to find out how long it has been since a lottery number hit

    Don't write description only. Show expected results in the attachment

  10. #10
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,175

    Re: 3 lottery to find out how long it has been since a lottery number hit

    Digit @ Pos 1 @ Pos 2 @ Pos 3 @ Any Pos
    0 3 5 4 12 corret

  11. #11
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,175

    Re: 3 lottery to find out how long it has been since a lottery number hit

    why 12 in digit zero is in the 1st position? the correct of 12 and in any position the sum of all positions, the value is inverted the value of 12 is in all positions ie its sum of the three positions

  12. #12
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: 3 lottery to find out how long it has been since a lottery number hit

    For this question "why 12 in digit zero is in the 1st position? the correct of 12 and in any position the sum of all positions, the value is inverted the value of 12 is in all positions ie its sum of the three positions" my answer was already published on the picture.
    Haven't you understand it?



    This:
    Digit @ Pos 1 @ Pos 2 @ Pos 3 @ Any Pos
    0 3 5 4 12 corret
    is an answer to question: how many occurences of given digit are in columns 1, 2, 3 and in all columns together.
    it is something totally different than (from your first post)
    how long it has been since a lottery number hit at positon1
    use in B2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and copy the cell to whole B2:D11 range
    in E2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and copy down.

    For any future question: In sample file always provide not only data, but also at least few expected results.
    Last edited by Kaper; 02-14-2020 at 04:29 AM.

  13. #13
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,175

    Re: 3 lottery to find out how long it has been since a lottery number hit

    ok ,KAPER, IS CORRECT,conglatulations, thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Lottery: Combinations of 6 numbers in a range of number 1 - 60
    By Baroem in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-02-2020, 04:49 PM
  2. [SOLVED] Lottery bonus number
    By Patcheen in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-29-2017, 04:39 PM
  3. [SOLVED] Please help to.modify the code to Possible 7/1-49 Lottery Number Combinations
    By Isaacliu in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-08-2016, 11:52 AM
  4. [SOLVED] LOTTERY FILTER#5, Find each Gap bewtween Digits, Single Cell w/ dash
    By david gonzalez in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-05-2014, 09:51 PM
  5. Assign random number for a lottery
    By Alibuchan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-11-2013, 10:35 PM
  6. [SOLVED] Pick 3 Lottery Number Macro
    By ssjagger in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-28-2013, 11:20 AM
  7. Lottery Number Checking
    By madnesstiger in forum Excel General
    Replies: 5
    Last Post: 02-15-2007, 07:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1