+ Reply to Thread
Results 1 to 4 of 4

Lottery Function

  1. #1
    Registered User
    Join Date
    04-30-2008
    Posts
    2

    Lottery Function

    Hi,
    I'm new and dunno if this is the right place to post this, or if what I want is possible... but here goes.

    Basically I wanna simulate a lottery. 1-49, selecting 6 numbers. I'd like it if the numbers selected would be in numerical order (i.e. if the 6 numbers went from A1:F1, A1 would be the smallest, F1 would be the largest) and some way to search for an entire combination. Some way to get a new load of numbers (like a button) would be good too. A bonus number would be an extra cool feature but isn't 100% necessary.

    Thanks if anyone can help with this.


  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Maybe like this:
    Please Login or Register  to view this content.
    You can hide column A and row 2. Push F9 to get a new combination.
    Last edited by shg; 05-01-2008 at 10:50 AM.

  3. #3
    Registered User
    Join Date
    04-30-2008
    Posts
    2
    Cool, that's great, thanks.

    Just to help my understanding of this sorta stuff, how does it get the results from the random numbers??

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    B1:H1 get the positions of the seven smallest random numbers in the list using the SMALL function with the position argument (1 to 7) taken from the header row.

    B2:H2 put B1:H1 in ascending order, again using the SMALL function and the numbers in the header.

+ 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