dyamic array/range - rolling equation

beng986

Board Regular
Joined
Jan 10, 2012
Messages
88
I have a few inputs in A1:B3:

months 20
Price per month 30
cost 180

then in:
A5 =sequence(1,b1,1,1)
A6 =sequence(1,b1,B2,0)
A7 =If(A5#=1,b3,0)

This gives me a useful and dynamic table. However, I would add a rolling P&L from A8 for the length of the number of months? Below is the result that I am trying to achieve (the bold line is A8). Any help would be very helpful

Price per month303030303030303030
Cost18000000000
P&L (The line I am struggling with)-150-120-90-60-300306090
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
How about
+Fluff 1.xlsm
ABCDEFGHIJKLMNOPQRSTU
120
230
3180
4
51234567891011121314151617181920
63030303030303030303030303030303030303030
71800000000000000000000
8-150-120-90-60-300306090120150180210240270300330360390420
Data
Cell Formulas
RangeFormula
B5:U5B5=SEQUENCE(,B1)
B6:U6B6=SEQUENCE(,B1,B2,0)
B7:U7B7=IF(B5#=1,B3,0)
B8:U8B8=SUMIFS(B6#,B5#,"<="&SEQUENCE(,B1))-B7
Dynamic array formulas.
 
Upvote 0
Solution
How about
+Fluff 1.xlsm
ABCDEFGHIJKLMNOPQRSTU
120
230
3180
4
51234567891011121314151617181920
63030303030303030303030303030303030303030
71800000000000000000000
8-150-120-90-60-300306090120150180210240270300330360390420
Data
Cell Formulas
RangeFormula
B5:U5B5=SEQUENCE(,B1)
B6:U6B6=SEQUENCE(,B1,B2,0)
B7:U7B7=IF(B5#=1,B3,0)
B8:U8B8=SUMIFS(B6#,B5#,"<="&SEQUENCE(,B1))-B7
Dynamic array formulas.
amazing thank you
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

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