How to turn the FILTER output array into a single row and remove all blanks and error values?

Rnkhch

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

I have the following array and I filter for those values that correspond to 2 in columns A. How can I have the output in a single row that will be as long as there are matching values and with all blanks and errors removed? Currently I get a 0 (cell I2) for the D4 blank cell.

Thanks for any input!

Book1
ABCDEFGHIJK
1
2181819572018
315243#N/A10317
4272181471515
53815621414618
62#N/A1031771466
721471515
83121198
91151724
1021414618
111221610
12271466
13
Sheet1
Cell Formulas
RangeFormula
G2:J6G2=FILTER(B2:E12,A2:A12=2)
Dynamic array formulas.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Do you yet have the TOROW() function in your Excel version?

22 06 27.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXY
1
218181957218103171471515141461871466
315243
427218
5381562
62#N/A10317
721471515
83121198
91151724
1021414618
111221610
12271466
Sheet2
Cell Formulas
RangeFormula
G2:X2G2=TOROW(FILTER(B2:E12,A2:A12=2),3)
Dynamic array formulas.
 
Upvote 0
Wow, that's a fabulous function. At least on my home computer I don't have it, but I'll have to check my work computer tomorrow, and I'll update. Just in case I don't have it there either, do you have any other tricks?

Thanks much!
 
Upvote 0
22 06 27.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXY
1
218181957218103171471515141461871466
315243
427218
5381562
62#N/A10317
721471515
83121198
91151724
1021414618
111221610
12271466
Sheet2
Cell Formulas
RangeFormula
G2:X2G2=TRANSPOSE(FILTERXML("<p><c>"&TEXTJOIN("</c><c>",1,IFERROR(FILTER(B2:E12,A2:A12=2)&"",""))&"</c></p>","//c"))
Dynamic array formulas.
 
Upvote 0
Solution
Awesome, thank you! Works really well. If I don't find TOROW, I'll mark this one as solution. I'll update.
 
Upvote 0
My work laptop doesn't have TOROW either yet, so for now I'll use your TRANSPOSE-based solution. Thanks again.
 
Upvote 0

Forum statistics

Threads
1,216,366
Messages
6,130,194
Members
449,565
Latest member
excelqueenintraining

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