2

I am trying to dynamically import data from another Google sheet (sheet2), to current Google sheet (sheet 1).
In sheet 1, I would like to input the starting cell A2 and ending cell D20 in cells B2 and B3, then use INDIRECT inside IMPORTRANGE to do that:

=IMPORTRANGE("url", "Training! INDIRECT("B2"):INDIRECT("B3")")

but it gave me a "formula parse error" message. Any help is highly appreciated.

enter image description here

1 Answer 1

1

You do NOT need INDIRECT

Just use 4 cells as in the image

Cell C1: spreadsheet ID (1-bdL8Ri4FWWSz1--f2zbg6vMAqnyWDlAyUKVeYc)
Cell B1: tab/sheet name (Training)
Cell B2: starting cell for range (J5)
Cell B3: ending cell of range (K6)

Use the formula: =IMPORTRANGE(C1,B1&B2&":"&B3)
OR =IMPORTRANGE(C1,"Training!"&B2&":"&B3)

(Do adjust the formula according to your ranges and locale)

enter image description here

2
  • 1
    Great, it works! Thank you very much for your help! Really love you, Marikamitsos!
    – Wei
    Commented May 19, 2023 at 18:47
  • Glad I could help. Please remember that as per site guidelines when an answer addresses your question, accept it and even upvote it so others can benefit as well. Commented May 19, 2023 at 20:04

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.