View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default How to draw a raffle ticket?

This is a very simple problem whan you add a third column which is the total
number of tickets sold. for example

Person tickets total tickets
Moe 20 20
Larry 30 50
Curly 40 90
Howard 20 110
Shemp 25 135
Joe 10 145
Joe Becker 5 150

If you choose a random number between 0 to 150 then

if the number is 0 <= X < 20 Moe wins
if the numbe is 20 <= X < 50 Larry wins

Rand() produces a number between 0 and 1. So you then justt multiply by 150
and look up the number in the 3rd column. The lookup can then be done with
Vlookup. Use True as the match type which returns the largest value less
than or equal to the search number.


"pablo bellissimo" wrote:

This is a tricky one...

I have collected a set of data regarding the performance of many employees.
Certain tasks at work allow employees to collect 'tickets'. I have a data
capture form into which the line managers enter how many 'tickets' each
employee has earned in the week. By the end of each month I have a list
which contains just 2 columns. Col A is a list of names and Col B is the
number of tickets earned. I need a way of replicating a raffle draw based on
these values. Each month there may be a different number of prizes available
to be won.

If john has 30 tickets, jim has 100 tickets and clare has 70 tickets how can
I work out a random way of deciding who has won each prize? This is
difficult to explain in text but just because someone has 50 per cent of the
tickets does not mean that they should win 50 per cent of the prizes.

I guess that at the minute I am asking you clever people to help me with the
logic of this as much as I am asking for the code...

Any help you are able to offer will be greatly appreciated.

Thanks