need dynamic array formula

Scott R

Active Member
Joined
Feb 20, 2002
Messages
493
Office Version
  1. 365
Platform
  1. Windows
I need a dynamic array formula in F3. The formula should return F3=3 and F4=10.
All arguments are dynamic arrays.
I was trying to avoid using OFFSET().

Book5
ABCDEF
1total after
2end date1/1/242/1/243/1/24end date
3apple2/1/20241233
4pear1/1/20242465
Sheet1
Cell Formulas
RangeFormula
C2:E2C2=DATE(2024,1,1)+DATE(,SEQUENCE(,3),)
B3:B4B3=EDATE(DATE(2024,2,1), {0;-1})
C3:E4C3=MAKEARRAY(2,3,LAMBDA(r,c, r*c))
F3:F4F3=SUMIF(C2#, ">" & B3#, C3#)
Dynamic array formulas.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
How about
Excel Formula:
=BYROW(B3#:C3,LAMBDA(br,SUMIF(C2#,">"&INDEX(br,,1),DROP(br,,1))))
 
Upvote 0
Solution
Clever! I'm puzzled how it works with BYROW(B3#:C3, ). I would've thought it had to be BYROW(B3#:C3#, ) ?
 
Upvote 0
It will spill down as far as col B regardless of whether you use C3 or C3#
 
Upvote 0
How about horizontally though. How does B3#:C3 pick up E4, for example, in the DROP portion?
Doesn't B3#:C3 literally mean B3:C4?
 
Upvote 0
Did not know that it would essentially coerce the sum range. Thx!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
Any idea why this works:
Excel Formula:
=BYROW( B3#:C3#, LAMBDA(br, SUMIF( C2#, ">" & INDEX( br,, 1 ), DROP( br,, 1 ))))

but this doesn't:
Excel Formula:
=BYROW( HSTACK(B3#,C3#), LAMBDA(br, SUMIF( C2#, ">" & INDEX( br,, 1 ), DROP( br,, 1 ))))

They seem equivalent...
 
Upvote 0

Forum statistics

Threads
1,224,815
Messages
6,181,136
Members
453,021
Latest member
Justyna P

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