Looking for a way to duplicate rows based on different numbers

Sarah1989

New Member
Joined
Aug 15, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hi, I hope I can explain this how it best makes sense.

The animal rescue I work at runs a raffle and our payment processor exports these payment to excel. I need to duplicate each row based on how many entries they have.

For example if someone has paid £10 we need to duplicate their row 9 times so they will have 10 entries. If someone has paid £3 we need to duplicate it twice so they have 3 entries etc.

Is there a way I can get it to duplicate each rowthe correct amount of times automatically based on the number in the payment amount cell?

Thanks for your help!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
@Sarah1989 Does something like this help?

MrXL_Aug.xlsm
ABCDE
1NamePaymentDraw list
2Player 1$1.00Player 1
3Player 2$1.00Player 2
4Player 3$3.00Player 3
5Player 4$2.00Player 3
6Player 5$6.00Player 3
7Player 6$1.00Player 4
8Player 7$1.00Player 4
9Player 8$5.00Player 5
10Player 9$6.00Player 5
11Player 10$1.00Player 5
12Player 11$1.00Player 5
13Player 12$1.00Player 5
14Player 13$1.00Player 5
15Player 14$1.00Player 6
16Player 15$2.00Player 7
17Player 16$5.00Player 8
18Player 8
19Player 8
20Player 8
21Player 8
22Player 9
23Player 9
24Player 9
25Player 9
26Player 9
27Player 9
28Player 10
29Player 11
30Player 12
31Player 13
32Player 14
33Player 15
34Player 15
35Player 16
36Player 16
37Player 16
38Player 16
39Player 16
40
Sheet2
Cell Formulas
RangeFormula
E2:E1001E2=LOOKUP(ROW(A1:A1000),SUBTOTAL(9,OFFSET(B$1,,,ROW($1:$1000)))+1,A$2:A$1000)&""
Dynamic array formulas.
 
Upvote 0
Solution
This formula has been amazing - thank you!

Is there any way to edit it for different monetary values? I've tried tweaking a few things but manage to break the formula every time.

I'm looking to be able to do it where £5 = 1 entry (so £20 would appear 4 times on the pick list) and also where £2 = 1 entry (so £20 would appear 10 times on the pick list)

These would all be on their own spreadsheets for different raffles.

Thanks so much!
 
Upvote 0
Maybe like below?
Each raffle sheet would be essentially the same but with its own ticket value entered in C2.

Book2
ABCDE
1NamePaymentTicket £Draw list
2Player 1$3.00$3.00Player 1
3Player 2$6.00Player 2
4Player 3$6.00Player 2
5Player 4$9.00Player 3
6Player 5$3.00Player 3
7Player 6$12.00Player 4
8Player 7$6.00Player 4
9Player 4
10Player 5
11Player 6
12Player 6
13Player 6
14Player 6
15Player 7
16Player 7
17
18
Sheet2
Cell Formulas
RangeFormula
E2:E1001E2=LOOKUP(ROW(A1:A1000),(SUBTOTAL(9,OFFSET(B$1,,,ROW($1:$100)))/$C$2)+1,A$2:A$100)&""
Dynamic array formulas.


Hope that helps.
 
Upvote 1

Forum statistics

Threads
1,223,911
Messages
6,175,322
Members
452,635
Latest member
laura12345

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