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

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
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,223,881
Messages
6,175,161
Members
452,615
Latest member
bogeys2birdies

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