Hello everyone,
I've scoured the forums with no luck to possible ways to figure out a problem, I've been having...
I've run into a big of a snag when dealing with a type of Lottery system. Long story short, a group of people receive a coupon/ticket that, at the end of the month, should be "picked out of a (large) hat" and win a prize.
I currently have the number of tickets they have in a chart like this;
Name # of Tickets
Charles 4
Cherly 9
Robert 5
Jane 2
David 3
I was thinking of having them listed multiple times (ColumnB) along with a unique identifier (ColumnA);
ColumnA ColumnB
Row1 1 Charles
Row2 2 Charles
Row3 3 Charles
Row4 4 Charles
Row5 5 Cherly
Row6 6 Cherly
Row7 7 Cherly
Row8 8 Cherly
Row9 9 Cherly
Row10 10 Cherly
Row11 11 Cherly
Row12 12 Cherly
Row13 13 Cherly
Row14 14 Robert
Row15 15 Robert
Row16 16 Robert
Row17 17 Robert
Row18 18 Robert
Row19 19 Jane
Row20 20 Jane
Row21 21 David
Row22 22 David
Row23 23 David
This way, all I would have to do is use
=VLOOKUP(RANDBETWEEN(1,23),$A:$B,2,0)
... and hold down F9 for a while while the names flash by and when releasing, I would have the winner's name!
My problem is that I do not know how to list the name N times the tickets they won...
Does anyone have any ideas?
Thanks in advance!
~d
I've scoured the forums with no luck to possible ways to figure out a problem, I've been having...
I've run into a big of a snag when dealing with a type of Lottery system. Long story short, a group of people receive a coupon/ticket that, at the end of the month, should be "picked out of a (large) hat" and win a prize.
I currently have the number of tickets they have in a chart like this;
Name # of Tickets
Charles 4
Cherly 9
Robert 5
Jane 2
David 3
I was thinking of having them listed multiple times (ColumnB) along with a unique identifier (ColumnA);
ColumnA ColumnB
Row1 1 Charles
Row2 2 Charles
Row3 3 Charles
Row4 4 Charles
Row5 5 Cherly
Row6 6 Cherly
Row7 7 Cherly
Row8 8 Cherly
Row9 9 Cherly
Row10 10 Cherly
Row11 11 Cherly
Row12 12 Cherly
Row13 13 Cherly
Row14 14 Robert
Row15 15 Robert
Row16 16 Robert
Row17 17 Robert
Row18 18 Robert
Row19 19 Jane
Row20 20 Jane
Row21 21 David
Row22 22 David
Row23 23 David
This way, all I would have to do is use
=VLOOKUP(RANDBETWEEN(1,23),$A:$B,2,0)
... and hold down F9 for a while while the names flash by and when releasing, I would have the winner's name!
My problem is that I do not know how to list the name N times the tickets they won...
Does anyone have any ideas?
Thanks in advance!
~d