Search code examples
google-sheetsfilteruniquegoogle-sheets-formulagoogle-sheets-query

Filter on reduced values from a column?


I'm sorry this is titled so horribly.

I have a category column in a sheet (col H) and in another sheet I've got the unique values in those columns with unique(sheetname!H)

How do I get only the categories (col H values) whose value in, say, col F, is 'credit'?

A given category will always have a given col-F value: will always be credit or debit. And will always belong to a certain person, as well. Say the person's name is in column B. How do I display the person who "belongs" to that category?


Solution

  • Using queries should make this simple.

    Something like this should work:

    =QUERY(A:H, "select H where F='credit'",0)

    More details on how the information is stored would help.

    The first parameter is the range of cells to perform the query on. The second parameter is the query. The third is the number of header rows at the top of data.

    More info on QUERY: https://support.google.com/docs/answer/3093343?hl=en

    To display the names in column B along with the categories, you can use:

    =QUERY(A:H, "select B,H where F='credit'",0)