Dynamic Array formula - Duplicate cell X Number of times

DarkNight

New Member
Joined
Apr 25, 2017
Messages
17
Office Version
  1. 365
Platform
  1. Windows
I'm trying to write a dynamic array formula that will take a list in column A and duplicate the list a specific number of times as dictated in column B
Input
Apple4
Orange1
Pear2
Banana3

Desired Output

Apple
Apple
Apple
Apple
Orange
Pear
Pear
Banana
Banana
Banana


Appreciate the help!
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

See if this is any use. Assumes that you are not using a Mac (implementing my point above would also clarify that).

22 04 03.xlsm
ABCD
1Input
2Apple4Apple
3Orange1Apple
4Pear2Apple
5Banana3Apple
6Orange
7Pear
8Pear
9Banana
10Banana
11Banana
12
List
Cell Formulas
RangeFormula
D2:D11D2=FILTERXML(REPLACE(CONCAT(REPT("</c><c>"&A2:A5,B2:B5)),2,2,"p")&"</c></p>","//c")
Dynamic array formulas.
 
Upvote 0
Solution
Updated my profile. This worked! Thank you so much!
ps I updated my profile
 
Upvote 0
You're welcome. Thanks for the follow-up. :)

.. and for updating your details. (y)
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,187
Members
452,616
Latest member
intern444

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