Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Spill formula to ignore filter conditions if it's blank

I am writing a spill formula that I would like to filter a range by department and/or name, and if no selections are made spill the entire range.

Currently, I have it written where it is able to filter one or the other or both; however, I get a #Value! error if they’re both blank.

=FILTER(A2:C6, IF( ISBLANK(A8),1,(A2:A6=A8) ) * IF( ISBLANK(B8),1,(B2:B6=B8) ) ,"")

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

Dept Person Value
Sales Mark 100
Sales Steve 100
Sales Casey 100
MGMT Michelle 100
MGMT John 100

(Image to follow the formula, markdown table for testing)

>Solution :

One can simply add the condition when blank to the areas

=FILTER(A2:C6,((A2:A6=A8)+(A8="")>0)*((B2:B6=B8)+(B8="")>0))

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading