Search code examples
if-statementgoogle-sheetsgoogle-sheets-formulaarray-formulasgoogle-sheets-query

Filtering multiple columns in Google Sheets


I'm trying to filter multiple rows and columns in Google Sheets and show only the cells that match the value that I want, but so far I didn't have success.

Here goes a link with the raw data and the expected output that I need. https://docs.google.com/spreadsheets/d/1355FJBYlzlU1RajWZ1Cj1qhXkRrU4QYegeQ4UzBeE3I/edit?usp=sharing

In this example, I wanna filter by activity and show only the days that I have a "Cycling" class, for instance. The filter needs to be a sort of dropdown since more people will be using it.

I tried to use the slicer feature, but it allows me to filter just 1 column and not multiple.

Any idea on how to make it?


Solution

  • try:

    =ARRAYFORMULA(TRANSPOSE(SPLIT(TRANSPOSE(QUERY({B3:F3; 
     IF(B4:F7<>"Cycling";;B4:F7)};;99^99)); " ")))
    

    0