+ Reply to Thread
Results 1 to 6 of 6

Lottery Number Checking

  1. #1
    Registered User
    Join Date
    01-06-2007
    Posts
    8

    Cross-Referencing Numbers. Is this possible?

    Hi All,

    After playing around with UK Lottery results and number selecting for the past few weeks, I've come accross an instance where I want to test if a certain pool of numbers has won a prize in the past 'x' amount of draws.

    Ok, simple as I can, this is what I've got:

    1> A pool of (in this case) 17 numbers picked at random. - These are placed in cells A1:A17.

    2> A list of previous winning balls from the past 1162 UK Lottery draws (excluding bonus ball). Draw 1 is at B2:G2, going down to draw 1162 at B1163:G1163.

    Now then, what I'm after is:

    In the cell to the right of each line of draw numbers I want to know how many numbers from my pool of 17 cropped up in that particular draw. A simple figure, no text required. i.e: if all 6 winning balls were in my pool of 17, the cell would state '6', and so on.

    I have seen a similar thread on this site which included a file called 'Lottery Checker'. I have played with that, but couldn't quite get it to work for me.

    Any help would be fantastic. Cheers guys.

    Carl
    Last edited by madnesstiger; 02-15-2007 at 07:18 PM. Reason: Title change

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi madnesstiger,

    Try this in H2, then drag formula down column

    =COUNTIF($A$1:$A$17,B2)+COUNTIF($A$1:$A$17,C2)+COUNTIF($A$1:$A$17,D2)+COUNTIF($A$1:$A$17,E2)+COUNTIF($A$1:$A$17,F2)+COUNTIF($A$1:$A$17,G2)

    Don't forget, if you win the Lottery, I'm still here!
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,719
    In H2 copied down column

    =SUMPRODUCT(COUNTIF(A$1:A$17,B2:G2))

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Thanks DLL, thats much shorter

  5. #5
    Registered User
    Join Date
    01-06-2007
    Posts
    8
    Hey Chippy!

    Works a treat mate, I can now add Conditional Formatting as I please.

    I thought it would be something along the lines of COUNTIF, I just confused myself in the process!

    Just for the record: out of the 17 numbers i picked for last nights draw, only 1 of them appeared! So don't start getting excited just yet... I'm a long way off Mystic Meg!

    Thanks again.


    Carl

  6. #6
    Registered User
    Join Date
    01-06-2007
    Posts
    8
    Sorry, only saw Chippies reply, then suddenly a couple more popped up.. cheers DLL. I had already copied Chippies formula accross, but the SUMPRODUCT method reads alot easier!

    Sad as it sounds, it's quite interesting tapping in groups of random numbers to see how many times they'd won millions in the past.. and very close to what mathematical probability says should happen.

    I think I'm turning into the son of Roy Cropper.. and I'm only 25! oooh!

    Thanks again guys.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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