0

I am using the import-range function to pull data from 5 different workbooks into one master sheet.

I am working with a date drop down and need each query to only return the entries that match the date of the selected by the drop down in Cell B2

This is my formula:

 =query(IMPORTRANGE("147XavtJCnSy1mlTPHU9MgOhv2MoTx6YCUyzguxF5IBU", "SunCay Cruise Lines's entries!C:F"), "Select *
Where G= date """&text(B2,"yyyy-MM-dd")&""" ")

This is my error code:

Unable to parse query string for Function QUERY parameter 2: NO_COLUMN: G

I have also tried using Col 7 instead of G, however, the same error occurs.

1
  • What were you expecting G to be? A column? A variable? Something else? Commented May 11, 2024 at 18:46

1 Answer 1

0

You may try:

=query(importrange("147XavtJCnSy1mlTPHU9MgOhv2MoTx6YCUyzguxF5IBU", "SunCay Cruise Lines's entries!C:G"), "Select Col1,Col2,Col3,Col4 Where Col5= date '"&text(B2,"yyyy-mm-dd")&"'")
  • Since you are importing an array of 5 columns (C:G), Column_C becomes Col1 & Column_DCol2 ................... Column_GCol5

OR

=let(Σ,importrange("147XavtJCnSy1mlTPHU9MgOhv2MoTx6YCUyzguxF5IBU", "SunCay Cruise Lines's entries!C:G"),
 filter(choosecols(Σ,1,2,3,4),choosecols(Σ,5)=B2))
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.