Quantcast
How to do randomized draw with excel - Beyond.ca - Car Forums
Results 1 to 13 of 13

Thread: How to do randomized draw with excel

  1. #1
    Join Date
    Feb 2006
    Location
    CEF4
    My Ride
    Ralli Machine
    Posts
    2,026
    Rep Power
    12

    Default How to do randomized draw with excel

    I am running a draw at my office for some hockey tickets. I have the names compiled in an excel sheet.

    is there any way to dump it into a program that will do a randomized draw on it?

    I dont want to print them off, cut them and then throw them in a hat.
    Cos...

  2. #2
    Join Date
    Jan 2006
    Location
    Calgary
    My Ride
    Axis powers
    Posts
    2,467
    Rep Power
    14

    Default

    =rand()
    or
    =randbetween(smallest,highest)

    then hit F9 a couple times with your head turned away

    edit. this is for a random number btw, but if you can script you can turn it into something different, but it really isn't worth the time to make something for a one time use

    assign the employees a number then you get a result
    Last edited by adam c; 01-06-2009 at 01:01 PM.
    Sig nuked by mod.

  3. #3
    Join Date
    Feb 2006
    Location
    CEF4
    My Ride
    Ralli Machine
    Posts
    2,026
    Rep Power
    12

    Default

    haha, you sir are a genius
    Cos...

  4. #4
    Join Date
    Jan 2006
    Location
    Calgary
    My Ride
    Axis powers
    Posts
    2,467
    Rep Power
    14

    Default

    btw if =randbetween gives you #name? you need to install the analysis tool pack

    Tools > Add Ins > Select the toolpacks > OK
    Sig nuked by mod.

  5. #5
    Join Date
    Feb 2006
    Location
    CEF4
    My Ride
    Ralli Machine
    Posts
    2,026
    Rep Power
    12

    Default

    Originally posted by adam c
    btw if =randbetween gives you #name? you need to install the analysis tool pack

    Tools > Add Ins > Select the toolpacks > OK
    no it works great, it is too bad you cant randomize the cells to have the peoples names just show up. But having a single cell that shows a number that corresponds to their location on the sheet isn't that much different.

    edit: i just did =randbetween(1,18) the number of people who have entered.

    Works out quite well
    Cos...

  6. #6
    Join Date
    Feb 2005
    Location
    calgary.ab.ca
    My Ride
    E90M3 510 Wagon
    Posts
    7,655
    Rep Power
    26

    Default

    could you do a if command? like if cell=# then display **

  7. #7
    Join Date
    Feb 2006
    Location
    CEF4
    My Ride
    Ralli Machine
    Posts
    2,026
    Rep Power
    12

    Default

    Originally posted by ercchry
    could you do a if command? like if cell=# then display **
    i dont think it would be an if would it? some sort of reference command, even maybe a true/false command.


    edit: just tried an if, it would work but you would have to have as many as you would have people. You have to reference it then do an if command I guess.
    Last edited by The Cosworth; 01-06-2009 at 01:21 PM.
    Cos...

  8. #8
    Join Date
    Jan 2006
    Location
    Calgary
    My Ride
    Axis powers
    Posts
    2,467
    Rep Power
    14

    Default

    you can but it would require VBS which wouldn't be useful unless you plan on using this sheet over and over again
    Sig nuked by mod.

  9. #9
    Join Date
    Dec 2005
    Location
    planet earth.
    Posts
    532
    Rep Power
    0

    Default

    Originally posted by The Cosworth


    no it works great, it is too bad you cant randomize the cells to have the peoples names just show up. But having a single cell that shows a number that corresponds to their location on the sheet isn't that much different.

    edit: i just did =randbetween(1,18) the number of people who have entered.

    Works out quite well
    haha, this is possible using if you uyse the if and and commands. (ie. display a name in a particular cell if the number associated with that name is the same as the 'random' number). but that is just really dorky and the extra work isn't worth it, unless you're doing this at a party or something and want some silly showy thing on a projector or somehting.

    but if you're THAT into it, you can do some reading and find out that =RAND function doesn't actually produce random numbers at all!
    Last edited by nonlinear; 01-06-2009 at 01:47 PM.

  10. #10
    Join Date
    Dec 2005
    Location
    planet earth.
    Posts
    532
    Rep Power
    0

    Default

    Originally posted by The Cosworth


    i dont think it would be an if would it? some sort of reference command, even maybe a true/false command.


    edit: just tried an if, it would work but you would have to have as many as you would have people. You have to reference it then do an if command I guess.
    if would definitely work, and you could get the winning name to appear in a particular cell. there are several ways you could do it, using if, and, etc. etc.

    you could have e.g. a column of numbers (e.g. 1-14) adjacent to a column of names - each number corresponding to a name. then, generate a number within 1-14 and it will display in a cell. then, using if statement you can ask if each number in the column next to names is equal to the 'random' number, and if so to display the associated name. you could do if commands in a column, in a cascading fashion so that the ultimate cell will display the text from the cell containing the if statment adjacent to the winners name

    it's kinda hard to explain in words.

    as someone else mentioned, you could also use the visual basic included in excel (alt + f11 to open it). you can do all kinds of crazy things in vba, and it's really simple. you can even make fancy looking buttons in excel spreadsheet that will execute your code when you press them, which might be cool if you're doing this at a party or somethign. let me know if y9oiu need help
    Last edited by nonlinear; 01-06-2009 at 01:56 PM.

  11. #11
    Join Date
    Jan 2006
    Location
    Calgary
    My Ride
    Axis powers
    Posts
    2,467
    Rep Power
    14

    Default

    like i said it's more time than it's worth for one draw
    Sig nuked by mod.

  12. #12
    Join Date
    Dec 2005
    Location
    planet earth.
    Posts
    532
    Rep Power
    0

    Default

    ^^^haha yea totally. you really only want to do it if you're totally nerdcore, or maybe if you're doing some kind of fuynny presentation where you want to show it on a screen
    Last edited by nonlinear; 01-06-2009 at 02:01 PM.

  13. #13
    Join Date
    Feb 2006
    Location
    CEF4
    My Ride
    Ralli Machine
    Posts
    2,026
    Rep Power
    12

    Default

    if I get slow I may try and work this out. I just volunteer on our social committee and am running this weeks draw, and didnt want to cut the shit out and do a hat draw.

    haha

    thanks for all your help
    Last edited by The Cosworth; 01-06-2009 at 02:09 PM.
    Cos...

Similar Threads

  1. can somone draw in paint how to hook up system

    By TomTom in forum In Car Entertainment / Electronics
    Replies: 4
    Latest Threads: 08-20-2004, 12:23 PM
  2. Anybody ever have a draw in their electrical system?

    By Redlyne_mr2 in forum Mechanical
    Replies: 13
    Latest Threads: 03-29-2004, 01:41 AM
  3. January 2004 Prize Draw

    By kenny in forum General
    Replies: 16
    Latest Threads: 02-03-2004, 10:04 AM
  4. Replies: 112
    Latest Threads: 01-24-2004, 05:23 PM

Posting Permissions

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