# Repeat list of names by number of ballots purchased

1. ## Repeat list of names by number of ballots purchased

I have searched high and low, I am looking to repeat a list of names by the number of ballots each individual has purchased. I am doing a draw for work and do not want to repeat each name manually into separate cells. Is there a formula for this? Can the rept function have the data repeated into separate cells?

2. ## Re: Repeat list of names by number of ballots purchased

Let's say your list of tickets purchased is on Sheet1 with column A being the name and B being # of tickets.
On Sheet2 in A1 Dragged or copied to the right and down
``Please Login or Register  to view this content.``
Does that work for you?

3. ## Re: Repeat list of names by number of ballots purchased

Assuming your list of names is in A2:A5 and the number of tickets each purchased is in B2:B5, then in C2 add a helper column that cumulatively sums the number of tickets with:

=SUM(B\$2:B2)

copied down

then your final list is produced with formula:

=IF(ROWS(\$E\$2:\$E2)>\$C\$5,"",INDEX(\$A\$2:\$A\$5,MIN(IF(ROWS(\$E\$2:\$E2)<=\$C\$2:\$C\$5,ROW(\$C\$2:\$C\$5)-ROW(\$C\$2)+1))))

confirmed with CTRL+SHIFT+ENTER not just ENTER, then copied down

4. ## Re: Repeat list of names by number of ballots purchased

This version would work without a helper column.....

in D2 and copied down

=LOOKUP(ROWS(D\$2:D2)-1,SUBTOTAL(9,OFFSET(B\$1,,,ROW(B\$1:B\$5)-ROW(B\$1)+1)),A\$2:A\$5)&""

5. ## Re: Repeat list of names by number of ballots purchased

Thank you! Worked like a charm.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### 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