Vstack+Filter+ISNumber how to remove blank results from table

Yugo101

New Member
Joined
Jun 12, 2017
Messages
35
Good evening.

I basically got the formula to work but in the returned results there is blank & N/A because there are nil results in 1 of my 3 tables.
So helper 1 is below
Ref 1CodeNameRef 2CodeNameRef 3CodeName
asdasd1234Johnasdasd23123jimasdasd1234John
asdasd2341asasdasd12Jayneasdasd12John
asdasd5412Simonasdasd23123Jimasdasd23123simon
On another sheet I have below code which works fine, till find nil result in a table (ref 2)

Excel Formula:
=UNIQUE(VSTACK(FILTER('Helper Sheet 1'!A2:C5,(ISNUMBER(SEARCH("John",'Helper Sheet 1'!C2:C5)))+(ISNUMBER(SEARCH("Simon",'Helper Sheet 1'!C2:C5))),""),FILTER('Helper Sheet 1'!E2:G5,(ISNUMBER(SEARCH("John",'Helper Sheet 1'!G2:G5)))+(ISNUMBER(SEARCH("Simon",'Helper Sheet 1'!G2:G5))),""),FILTER('Helper Sheet 1'!I2:K5,(ISNUMBER(SEARCH("simon",'Helper Sheet 1'!K2:K5)))+(ISNUMBER(SEARCH("John",'Helper Sheet 1'!K2:K5))),"")))

How can remove the blank row so the result below it moves up?.
RefCodeName
asdasd1234John
asdasd5412Simon
#N/A#N/A
asdasd12John
asdasd23123simon
 

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:
Book1
ABCDEFGHI
1Ref 1CodeNameRef 2CodeNameRef 3CodeName
2asdasd1234Johnasdasd23123jimasdasd1234John
3asdasd2341asasdasd12Jayneasdasd12John
4asdasd5412Simonasdasd23123Jimasdasd23123simon
5
6
7RefCodeName
8asdasd1234John
9asdasd1234John
10asdasd12John
11asdasd5412Simon
12asdasd23123simon
Sheet6
Cell Formulas
RangeFormula
A8:C12A8=LET(w,WRAPROWS(TOCOL(A2:I4),3),DROP(REDUCE("",{"John","Simon"},LAMBDA(a,b,VSTACK(a,FILTER(w,ISNUMBER(SEARCH(b,INDEX(w,0,3))))))),1))
Dynamic array formulas.
 
Upvote 0
Another option
Excel Formula:
=LET(v,VSTACK('Helper Sheet 1'!A2:C5,'Helper Sheet 1'!E2:G5,'Helper Sheet 1'!I2:K5),FILTER(v,(ISNUMBER(SEARCH("John",INDEX(v,,3))))+(ISNUMBER(SEARCH("Simon",INDEX(v,,3)))),""))
 
Upvote 0
Solution
Try:
Book1
ABCDEFGHI
1Ref 1CodeNameRef 2CodeNameRef 3CodeName
2asdasd1234Johnasdasd23123jimasdasd1234John
3asdasd2341asasdasd12Jayneasdasd12John
4asdasd5412Simonasdasd23123Jimasdasd23123simon
5
6
7RefCodeName
8asdasd1234John
9asdasd1234John
10asdasd12John
11asdasd5412Simon
12asdasd23123simon
Sheet6
Cell Formulas
RangeFormula
A8:C12A8=LET(w,WRAPROWS(TOCOL(A2:I4),3),DROP(REDUCE("",{"John","Simon"},LAMBDA(a,b,VSTACK(a,FILTER(w,ISNUMBER(SEARCH(b,INDEX(w,0,3))))))),1))
Dynamic array formulas.
Sorry bit of 2 things, if I add blanks columns in-between data and add new rows I seems to pick all the data up. but if don't add blank columns it works perfectly even when add extra rows
 
Last edited:
Upvote 0
Try adding this bit:
Rich (BB code):
=LET(w,WRAPROWS(TOCOL(A2:M4,1),3),DROP(REDUCE("",{"John","Simon"},LAMBDA(a,b,VSTACK(a,FILTER(w,ISNUMBER(SEARCH(b,INDEX(w,0,3))))))),1))

Book1
ABCDEFGHIJKLM
1Ref 1CodeNameRef 2CodeNameRef 3CodeName
2asdasd1234Johnasdasd23123jimasdasd1234John
3asdasd2341asasdasd12Jayneasdasd12John
4asdasd5412Simonasdasd23123Jimasdasd23123simon
5
6
7RefCodeName
8asdasd1234John
9asdasd1234John
10asdasd12John
11asdasd5412Simon
12asdasd23123simon
Sheet1
Cell Formulas
RangeFormula
A8:C12A8=LET(w,WRAPROWS(TOCOL(A2:M4,1),3),DROP(REDUCE("",{"John","Simon"},LAMBDA(a,b,VSTACK(a,FILTER(w,ISNUMBER(SEARCH(b,INDEX(w,0,3))))))),1))
Dynamic array formulas.


Note that this method won't work if you have blank in your actual tables. I'd use VSTACK like Fluff suggested.
Book1
ABCDEFGHIJKLM
1Ref 1CodeNameRef 2CodeNameRef 3CodeName
2asdasd1234Johnasdasd23123jimasdasd1234John
3asdasd2341asasdasd12Jayneasdasd12John
4asdasd5412Simonasdasd23123Jimasdasd23123simon
5
6
7RefCodeName
8asdasd1234John
9asdasd1234John
10asdasd12John
11asdasd5412Simon
12asdasd23123simon
Sheet1
Cell Formulas
RangeFormula
A8:C12A8=LET(w,VSTACK(A2:C4,F2:H4,K2:M4),DROP(REDUCE("",{"John","Simon"},LAMBDA(a,b,VSTACK(a,FILTER(w,ISNUMBER(SEARCH(b,INDEX(w,0,3))))))),1))
Dynamic array formulas.
 
Last edited:
Upvote 0
Try adding this bit:
Rich (BB code):
=LET(w,WRAPROWS(TOCOL(A2:M4,1),3),DROP(REDUCE("",{"John","Simon"},LAMBDA(a,b,VSTACK(a,FILTER(w,ISNUMBER(SEARCH(b,INDEX(w,0,3))))))),1))

Book1
ABCDEFGHIJKLM
1Ref 1CodeNameRef 2CodeNameRef 3CodeName
2asdasd1234Johnasdasd23123jimasdasd1234John
3asdasd2341asasdasd12Jayneasdasd12John
4asdasd5412Simonasdasd23123Jimasdasd23123simon
5
6
7RefCodeName
8asdasd1234John
9asdasd1234John
10asdasd12John
11asdasd5412Simon
12asdasd23123simon
Sheet1
Cell Formulas
RangeFormula
A8:C12A8=LET(w,WRAPROWS(TOCOL(A2:M4,1),3),DROP(REDUCE("",{"John","Simon"},LAMBDA(a,b,VSTACK(a,FILTER(w,ISNUMBER(SEARCH(b,INDEX(w,0,3))))))),1))
Dynamic array formulas.


Note that this method won't work if you have blank in your actual tables. I'd use VSTACK like Fluff suggested.
Book1
ABCDEFGHIJKLM
1Ref 1CodeNameRef 2CodeNameRef 3CodeName
2asdasd1234Johnasdasd23123jimasdasd1234John
3asdasd2341asasdasd12Jayneasdasd12John
4asdasd5412Simonasdasd23123Jimasdasd23123simon
5
6
7RefCodeName
8asdasd1234John
9asdasd1234John
10asdasd12John
11asdasd5412Simon
12asdasd23123simon
Sheet1
Cell Formulas
RangeFormula
A8:C12A8=LET(w,VSTACK(A2:C4,F2:H4,K2:M4),DROP(REDUCE("",{"John","Simon"},LAMBDA(a,b,VSTACK(a,FILTER(w,ISNUMBER(SEARCH(b,INDEX(w,0,3))))))),1))
Dynamic array formulas.
I did like your formula as quick away to add additional people but yeah there will always be blanks sadly in my tables. Fluff's formula worked perfectly with that scenario
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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