filter function that skip blank cells

ExcelNewbie2020

Active Member
Joined
Dec 3, 2020
Messages
293
Office Version
  1. 365
Platform
  1. Windows
Sirs/Ma'ams,

I have a wide range of data let say from A to Z with specific column headers. I would like to create a filter function that will show me the values under each column header. I already used this function =FILTER(A2:F4,A1:F1=B9) but it replaced blank cells with "0". Is there any function that will skip blank cells?

image_2022-06-24_081801706.png
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Someone else may have a shorter way of doing this but here is one option:
Excel Formula:
=FILTER(FILTER(A2:F4,A1:F1=B9),FILTER(A2:F4,A1:F1=B9)<>"")

And to save time recreating the data if they want to try:

Book1
ABCDEF
1ABCDEF
241265
34326
41326
5
6
7
8
9FilterB
101
111
Sheet1
Cell Formulas
RangeFormula
B10:B11B10=FILTER(FILTER(A2:F4,A1:F1=B9),FILTER(A2:F4,A1:F1=B9)<>"")
Dynamic array formulas.
 
Upvote 0
Solution
Slightly shorter
Excel Formula:
=LET(f,FILTER(A2:F4,A1:F1=B9),FILTER(f,f<>""))
 
Upvote 0

Forum statistics

Threads
1,215,459
Messages
6,124,946
Members
449,198
Latest member
MhammadishaqKhan

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