0

I am trying to import 2 columns from one sheet into another but trying to make sure I import only the cells from col2 when col1 has a value (all different values).

I imported my first column needed (column E) with the following formula =QUERY(IMPORTRANGE("LINK", "ALL Product Overview!E3:E"), "select Col1 where Col1 is not Null", 0)

Now I am trying to import my second col (column AY) but only the cells in Column AY when the same cell number in column E has value.

4
  • enclose you QUERY() within an =IF(not()) support.google.com/docs/answer/3093305?hl=en
    – graham
    Oct 7, 2020 at 17:47
  • 1
    Use array with your columns in query =QUERY({IMPORTRANGE("LINK", "ALL Product Overview!E3:E"), IMPORTRANGE("LINK", "ALL Product Overview!AY3:AY")}, "Select * where Col1 is not Null", 0)
    – Oleg_S
    Oct 8, 2020 at 6:59
  • @User24601 Would you give an example of how such a query would look? The reference to the documentation on NOT doesn't seem to provide much guidance.
    – Tedinoz
    Oct 12, 2020 at 21:28
  • @OlegS Perhaps your comment would be better submitted as an answer - for the benefit of future users.
    – Tedinoz
    Oct 14, 2020 at 21:18

1 Answer 1

1

Use array with your columns in query

=QUERY(
 {IMPORTRANGE("LINK", "ALL Product Overview!E3:E"), 
  IMPORTRANGE("LINK", "ALL Product Overview!AY3:AY")}, 
"Select * where Col1 is not Null", 0)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.