Search code examples
google-sheetsgoogle-sheets-formulaformula

Using query in google sheet to call certain rows


Hi everyone,

I want to get all the rows where A=1, A=2. The query is very simple but I'm not sure why there is no output. I guess is the problem of the format for column A but I'm not sure what should I change in my formula so that the formula can work. Appreciate any help or advice!


Solution

  • A can't be both: 2 and 1. Instead try

    =query(A3:C, "Where A = 2 or A = 1", 0)