Home > front end >  Show no results if search box is empty using Filter Function on Google Sheets
Show no results if search box is empty using Filter Function on Google Sheets

Time:03-31

I'm hoping somebody has a quick solution for me. I have a fantasy sport league setup on a google sheet. One of the sheets allows other people to search a database of players. Its broken down into four different search boxs offering the following search options: By Player, Position, Owner or Player designation. I'm using the filter function:

=filter(Sheet242!A2:E,search(B6,Sheet242!A2:A),search(E6,Sheet242!E2:E),search(B8,Sheet242!C2:C),search(E8,Sheet242!B2:B))

It draws from a table on a separate sheet.

This works great with one exception. It returns all the values in my table when all 4 search boxes have no value. I want it to filter no results if all 4 boxes are empty.

Here is a link to my google sheet so you can have a better visual of what im trying to do: enter image description here

  • Related