Home > OS >  query not resolving formula
query not resolving formula

Time:12-03

I am trying to concatenate data in QUERY formula from cell as shown in image (https://i.stack.imgur.com/3EdUX.jpg) Formula is :=QUERY(CONCATENATE(A9,"!A2:D5"),"Select A,B") picking data_range from another cell how can I get it?

picking "data_range" from another cell I want to "data_range" in query changeable

CodePudding user response:

You could try to use INDIRECT?

=QUERY(INDIRECT(A9),"SELECT A, B")

the INDIRECT function will take the value in cell A9, which is the cell that contains the "data_range" value, and use it as the range for the QUERY formula. The QUERY formula will then select columns A and B from the specified range.

And with CONCATENATE:

=QUERY(INDIRECT(CONCATENATE(A9,"!A2:D5")),"SELECT A, B")

CodePudding user response:

use:

=QUERY(INDIRECT(A9&"!A2:D5"); "select Col1,Col2"; )
  • Related