Cancel filter function if cell blank

Ngreen2571

New Member
Joined
Sep 17, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Afternoon hive mind.

I current have a simple filter function up and running for filtering out the categories of crime. I'm using an active X combo box for my list to filter. What I'm wondering if, is there any way for it to return all results when my combo box is blank? Reason I ask if I then have a countif dashboard running from these results and returning all results would give everyone the high level figures.

Thank you in advance.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Welcome to the forum. :)

Yes there is, but you haven't given us any idea of your code/formulas, so it's hard to be specific.
 
Upvote 0
Welcome to the forum. :)

Yes there is, but you haven't given us any idea of your code/formulas, so it's hard to be specific.
Morning.

The formula I have up and running is as follows
=filter('search data table'!A1:O5612,'search data table'!M1:M5612=B2,"No Results")


B2 being the cell my combo box is linked to as a search field. Hope this helps? Thank you in advance! Let me know of anything else is needed.
 
Upvote 0
You should be able to use something like:

Excel Formula:
=IF(B2="",'search data table'!A1:O5612,filter('search data table'!A1:O5612,'search data table'!M1:M5612=B2,"No Results"))
 
Upvote 0
Solution
I knew it needed nesting in an IF function I just couldn't figure it out! Thank you it works!
 
Upvote 0
Glad we could help. :)

Just for future reference, in case you ever have a similar issue with multiple criteria, you could also do something like this:

Excel Formula:
=filter('search data table'!A1:O5612,('search data table'!M1:M5612=B2)+(B2=""),"No Results")

but for just one criterion it makes more sense not to bother filtering at all if the criterion is blank.
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,184
Members
452,615
Latest member
bogeys2birdies

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