2

I have a spreadsheet that I want to pull data from another spreadsheet.
This is my formula:

=query(importrange("https://docs.google.com/spreadsheets/d/14lj6yPp8h9U1JAEA4dz-uROaQgZxy60NjXniHOFUeAU/edit#gid=0", "TRANSACTIONS!B6:P9999"), "select Col2, Col3, Col13, Col14, Col15, Col16 where Col16='EV' and Col2>=date '"&to_text("2024-04-01")&"' AND Col2<date '"&to_text("2024-05-01")&"'", 0)

This is the error I am receiving:

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

What am I doing wrong?

1 Answer 1

2

The range B6:P9999 has 15 columns. This explains the error.

In other words, B is Col1, C is Col2, and so on. P is Col15.

2
  • 1
    Thank you! I made the assumption, obviously, that the columns referred to the entire sheet, not the imported range. Doh! Thanks for the clarification.
    – Salt_Tea
    Commented Apr 29 at 21:06
  • @Salt_Tea you've asked a few questions that have received answers consider accepting and or upvoting if they solved your problem. See what can I do when someone answers my question?
    – Blindspots
    Commented May 10 at 5:01

Your Answer

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

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