Is it possible to use FILTER with BYROW to get a spill? If not, how else can this be done?

Rnkhch

Well-known Member
Joined
Apr 28, 2018
Messages
578
Office Version
  1. 365
Platform
  1. Windows
Hello,

Suppose I have the range in the attached XL2BB, and I FILTER each row for numbers greater than 50. Can use BYROW to get the indicated result in a single spill? If not, is there another way?

=BYROW(B3:G11,LAMBDA(a,FILTER(a,a>50)))
this gives the "nested arrays not supported" error :oops:

Blank power workbook1
ABCDEFGHIJKLMN
1
2desired output
31754496946175469
46598504252100659852100
5694477184994697794
66889224047266889
74433242777807780
85314829153885382915388
98316969597638396959763
1022836086309683608696
119833899551579889955157
12
Sheet3


Thanks for any input! 🤗
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
There may well be better ways, but this is what I came up with, depending on whether the output needs to be numerical or not.

22 12 18.xlsm
ABCDEFG
1
2
3175449694617
46598504252100
5694477184994
6688922404726
7443324277780
8531482915388
9831696959763
10228360863096
11983389955157
12
13Text
145469
15659852100
16697794
176889
187780
195382915388
208396959763
2183608696
229889955157
23
24Numerical
255469
26659852100
27697794
286889
297780
305382915388
318396959763
3283608696
339889955157
Rnkhch
Cell Formulas
RangeFormula
B14:F22B14=TEXTSPLIT(SUBSTITUTE(TEXTJOIN(",",1,SCAN("",B3:G11,LAMBDA(a,b,IF(COLUMN(b)=COLUMN(B3),"|","")&IF(b>50,b,"")))),"|,","|"),",","|",1,,"")
B25:F33B25=IFERROR(TEXTSPLIT(SUBSTITUTE(TEXTJOIN(",",1,SCAN("",B3:G11,LAMBDA(a,b,IF(COLUMN(b)=COLUMN(B3),"|","")&IF(b>50,b,"")))),"|,","|"),",","|",1)+0,"")
Dynamic array formulas.
 
Upvote 0
Hi

=IFERROR(--TEXTSPLIT(TEXTAFTER(BYROW(B3:G11,LAMBDA(K,CONCAT("|"&TOCOL(IF(K>50,K,x),3)))),"|",SEQUENCE(,6)),"|"),"")
 
Upvote 0
Another option
Excel Formula:
=DROP(REDUCE("",SEQUENCE(ROWS(B3:G11)),LAMBDA(x,y,VSTACK(x,EXPAND(FILTER(INDEX(B3:G11,y,0),INDEX(B3:G11,y,0)>50),,6,"")))),1)
 
Upvote 0
Another option
Excel Formula:
=DROP(REDUCE("",SEQUENCE(ROWS(B3:G11)),LAMBDA(x,y,VSTACK(x,EXPAND(FILTER(INDEX(B3:G11,y,0),INDEX(B3:G11,y,0)>50),,6,"")))),1)
Awesome formula! I wish Evaluate Formula worked on formulas like this in a CELL environment where you could see what each thing is actually doing!
 
Upvote 0
Awesome, thanks all! 🤗

I'm gonna start studying all your functions, and I'll make a LAMBDA :cool:
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
Awesome formula! I wish Evaluate Formula worked on formulas like this in a CELL environment where you could see what each thing is actually doing!
I would going to try an Ai chat to explain a formula, but it is currently down. :unsure:. Not sure if they work for excel formulas. You should check out @Xlambda's ABYROW formula.
 
Upvote 0
Thank you jaeiow for the great suggestion!

I would going to try an Ai chat to explain a formula, but it is currently down.
Does this forum have a chat feature? 😯
 
Last edited:
Upvote 0
No, i meant chatgpt. let me see if it woke up today and can detail Fluffs formula.
This Excel formula appears to use a combination of functions to filter a range of cells and return only the rows that meet a certain condition.

The REDUCE function applies a function (specified by the LAMBDA function) to a sequence of items and returns a single result. The SEQUENCE function generates a sequence of numbers from 1 to the number of rows in the range B3:G11. These numbers are passed to the LAMBDA function as the variable y, which is used to reference the current row of the range B3:G11 using the INDEX function.

The FILTER function is then used to select only the rows where the value in the first column (referenced using INDEX(B3:G11, y, 0)) is greater than 50. The EXPAND function is used to convert the filtered rows into a vertical range, and the VSTACK function is used to stack this range on top of the current value of x (which is passed to the LAMBDA function as a variable).

Finally, the DROP function is used to remove the first row from the final result.

Overall, this formula appears to be filtering the range B3:G11 to select only the rows where the value in the first column is greater than 50, and then returning the resulting range without the first row.
 
Upvote 0

Forum statistics

Threads
1,223,902
Messages
6,175,278
Members
452,629
Latest member
SahilPolekar

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