I am not sure how to import data to corresponding cells.

query(IMPORTDATA("https://www.iftach.org/taxmatrix/charts/4Q2020.csv"), "Select Col4 where Col1 = '"&A4:A&"'"))

Where range A4:A is a list of the states.

This one works fine:

query(IMPORTDATA("https://www.iftach.org/taxmatrix/charts/3Q2020.csv"), "Select Col4 where Col1 is not null and Col1<>'44013'")

(it just gives me some extra line with text 44013). But it just imports data. I need to import this data, but checking first A4:A.


This seems to work for me:

=query(IMPORTDATA("https://www.iftach.org/taxmatrix/charts/4Q2020.csv"), "Select Col4 where Col1 = '"&A4&"'",0)

But you would need to copy the formula down.

enter image description here

The last argument of the QUERY tells the number of header rows. I specified 0 so that no header would be returned. The default version (where you don't specify it) returns the header based on an algorithmic guess.

  • If the answer helped to solve the problem please check the ✓ symbol next to the answer.
    – ZygD
    Jul 16 at 6:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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