A formula to create the # of names you need for a "drawing"

export9

New Member
Joined
Apr 20, 2018
Messages
3
Say Bob Smith earned 13 raffle tickets
Tim Harding earned 30, etc etc.

Is there a formula that you can input that will create 13 versions of Bob Smiths name and 30 of Tim Hardings?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Welcome to the board.

If you're looking for a way to pick a winner based on the number of tickets each person has, consider:

ABCDE
1NameTicketsSumRandom #Winner
2Bob Smith13048Ann Smith
3Tim Harding3013
4Ann Smith2543
5Mary Jones1868
6Alice Cooper2086

<tbody>
</tbody>
Sheet6


Worksheet Formulas
CellFormula
C2=IF(A2="","",SUM($B$1:$B1))
D2=RANDBETWEEN(<fon
1,SUM(B:B))-1</fon
E2=INDEX(A2:A100,MATCH(D2,C2:C100))

<tbody>
</tbody>

<tbody>
</tbody>




The names are in A, the number of tickets are in B, column C finds the sum of the tickets so far. D2 picks a random number from 1 to the total number of tickets, less 1. So if the random number is 0-12, Bob wins, if it's from 13-42, Tim wins, etc.

Let us know if this works for you.
 
Last edited:
Upvote 0
Say Bob Smith earned 13 raffle tickets
Tim Harding earned 30, etc etc.

Is there a formula that you can input that will create 13 versions of Bob Smiths name and 30 of Tim Hardings?

Hi!

If I understand correctly what you want, maybe the suggestion below can helps.

Try this:

1) Create a table with the name Table with the columns Name, Tickets and Total of Tickets. Look at the table below.

ABCDEF
1NameTicketsTotal of TicketsList of Names
2Bob Smith1313Bob Smith
3Tim Harding1831Bob Smith
4Paul Gold1243Bob Smith
13Bob Smith
14Bob Smith
15Tim Harding
31Tim Harding
40Paul Gold
44Paul Gold
45
****************************************************

<tbody>
</tbody>


2) After that, put the formula below in C2 (Total of Tickets column):

=SUM(B$2:B2)

3) Finally, put the formula below in E2 and copy down

=IF(ROWS(E$2:E2)>MAX(Table[Total of Tickets]),"",INDEX(Table[Name],MATCH(1,INDEX(--(Table[Total of Tickets]>=ROWS(E$2:E2)),),0)))

Markmzz
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,336
Messages
6,124,338
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top