Is it possible to write a query (inside a formula) that references non-adjacent (discontinuous, discontiguous, I don't know the proper phrase) ranges? For instance: =query(A2:C,E2:F,"Select Col2 where Col5=3")
I want to be able to put my query in Column D, so I wanted to split the range around it. If I just say "Query(A2:F..." it will detect circular dependency when the equation is in Column D.
If it helps, I have shared a spreadsheet with an example (highlighted in yellow):
To select non-adjacent cells, simply hold down the command key (for Mac users, PC users hold down the CTRL key) while making your selections. Keep in mind this update is only available in the new Google Sheets, so consider this a great reason to upgrade your account.
Select Non-Adjacent Cells or Columns with Google Sheets Holding down the CTRL key on the keyboard and dragging over the required cells with the mouse is the only way that non-adjacent columns and cells can be selected in Google Sheets.
Using the Ctrl Key Holding the Ctrl key and selecting the cells is one of the best ways to select non adjacent cells in Excel.
Try:
=query({A2:C,E2:F},"Select Col2 where Col5=3")
or if you don't want the label use:
=query({A2:C,E2:F},"Select Col2 where Col5=3 label Col2 ''")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With