create dynamic array based on cell references, number of times to repeat and length

exceluser321a

New Member
Joined
May 31, 2018
Messages
1
Hi,

I'm trying to create an array (which will be ultimately used in a formula e.g. NPV) of cell references which repeat themselves (which will be dependent on another cell reference). The range of cell references to be repeated will also be dependent on another cell reference. Sorry if I didn't articulate this well. I've attempted to illustrate an example below:

[TABLE="width: 200"]
<tbody>[TR]
[TD]Length[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Amount 1[/TD]
[TD]100[/TD]
[TD]110[/TD]
[TD]110[/TD]
[TD]110[/TD]
[/TR]
[TR]
[TD]Repeat Amount 1 By[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Amount 2[/TD]
[TD]110[/TD]
[TD][/TD]
[TD][/TD]
[TD]115[/TD]
[/TR]
[TR]
[TD]Repeat Amount 2 By[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Returned Array[/TD]
[TD](100,100,110,110,110,110,110,110,110)[/TD]
[TD](110,110,110)[/TD]
[TD](110,110,110,110,115,115)[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Thanks in advance.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,223,896
Messages
6,175,263
Members
452,627
Latest member
KitkatToby

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