Google-sheets – If colE contains value then import colAY from same sheet

formulasgoogle sheetsimportrange

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.

Best Answer

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)