Display Results Matching Search Criteria, Ignore Blanks

dramqueenuk

New Member
Joined
Sep 22, 2020
Messages
21
Office Version
  1. 2016
Platform
  1. Windows
I have a sheet called "Data" that contains many rows of information in columns A to K.

I have a sheet called "Search" where I have this:
1602591364160.png


The user can fill in the search fields (as many or as few as they want). These fields are named:
C2 = "Agency"
C4 = "User_ID"
C6 = "Surname"
E6 = "First_Name"
F2 = "From_Date"
F3 = "To_Date"

Ultimately, I want a search to be done when any of these fields are populated, searching the data in the 'Data' sheet and displaying ALL matching rows.

I was going to use a helper cell in H2 to do a countif so that in cell B9, my formula could check if this number of rows was already displayed before running the rest of the formula as I'd read that would speed it up. However, I was finding that I was having to use a lot of nested IF conditions in cell H2 to tell it to ignore blanks; so many in fact that it told me I had too many arguments, and I feel there must be a better, more efficient way of doing this.

I can't use macros as the users will be viewing the spreadsheet online, not in the desktop version of Excel.

Any suggestions of a better method?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
That's exactly what I needed, AhoyNC. Thanks very much for taking the time to share it with me!
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,809
Members
449,048
Latest member
greyangel23

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