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

How to QUERY a Spreadsheet by Row value


I Have a table in my spreadsheet like this

FEB  MAR  APR  MAY
 10   14    7   13
 12    9    8   19
 15   11   14   16

And I want to use this info in another table. What I want to accomplish is in this another table compare two months by getting this info with the name of the month.

FEB  APR
 10   7
 12   8
 15  14

What I did was

=QUERY(AnotherTable!1:1001; "SELECT * WHERE Row2 = 'FEB'")

But it didn't seems to work.

Any thoughts?


Solution

  • You might be able to use a FILTER formula instead:

    =FILTER(AnotherTable!1:1001;AnotherTable!2:2="FEB")

    or to return both months:

    =FILTER(AnotherTable!1:1001,((AnotherTable!2:2="FEB")+(AnotherTable!2:2="APR")))