Search code examples
google-sheetsgoogle-sheets-querygoogle-sheets-formula

=QUERY(ImportRange -- Can I bring Col14 and Col15 of original sheet into the new sheet at a diff cell?


Current function, working perfectly so far:

=QUERY(ImportRange("doclink", "Info!A2:S"), "Select Col1,Col3,Col4,Col5,Col6,Col7,Col8,Col9,Col12 WHERE Col18='At Risk' order by Col1 asc")

In my original sheet I have Col14 and Col15 with relevant info I'd like to transpose into my new sheet's Col13.

Is this even possible to input 2 cells' info into 1 new cell?

How would I pull from those and "skip" inputting in Col10, Col11, Col12 of the new sheet? (new info needs to go there that is not pulled from original sheet)

Feel free to point me in the right direction or even let me know if this is possible. I've been googling for a bit but I think my lack of vernacular is limiting what I find.

Many thanks!


Solution

  • So far it looks as if your column 15 would need 2 separate imports joined together like this which is a bit ugly I'm afraid:

    =ArrayFormula({query(importrange("...","sheet6!a:s"),"Select Col14 where Col18='At Risk'")&
    query(importrange("...","sheet6!a:s"),"Select Col15 where Col18='At Risk'")})