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.
 
This seems more straightforward:
Excel Formula:
=BYROW( C3# * (C2# > B3#), LAMBDA(br, SUM( br )))
 
Upvote 0

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Try the following.

Dynamic_Arrays.xlsm
ABCDEG
1total after
2end date01-Jan-2401-Feb-2401-Mar-24end date
3apple01-Feb-241233
4pear01-Jan-2424610
5
1a
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))
G3:G4G3=BYROW(C3#*(C2# >B3#),SUM)
Dynamic array formulas.
 
Upvote 0
C2# is a range not an array.
Then, I'm confused about what being a range vs array means. I was under the impression that C2# with the hash symbol is a spilled array.
 
Upvote 0
Whilst the formula in C3 is an array, C3# is a spilled range.
 
Upvote 0
Whilst the formula in C3 is an array, C3# is a spilled range.
If I understand correctly, I can't pass it in like this,
Rich (BB code):
=BYROW(B3#:C3,LAMBDA(br,SUMIF(MAKEARRAY(2,3,LAMBDA(r,c, r*c)),">"&INDEX(br,,1),DROP(br,,1))))

but the result of the array formula is a range, which is acceptable.
 
Upvote 0

Forum statistics

Threads
1,226,219
Messages
6,189,696
Members
453,565
Latest member
Mukundan

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