Reputation: 81
I am trying to pull data from one to another sheet, but only specific columns, but it is not working.
=QUERY({ IMPORTRANGE("https://docs.google.com/spreadsheets/d/14BJcO6IzT4t4ioryXivFqSEljTDPukmxTaqKV6z10U0","Pallets Total!A:B"); IMPORTRANGE("https://docs.google.com/spreadsheets/d/14BJcO6IzT4t4ioryXivFqSEljTDPukmxTaqKV6z10U0","Pallets Total!F:H"); IMPORTRANGE("https://docs.google.com/spreadsheets/d/14BJcO6IzT4t4ioryXivFqSEljTDPukmxTaqKV6z10U0","Pallets Total!O:Q") }, "WHERE Col2 = '"&TEXTJOIN("' OR Col2 = '", TRUE, A:A)&"'", 0)
I have tried to just name the different columns in the Importrange or use query itself and name the different col
as here:
=QUERY({ IMPORTRANGE("https://docs.google.com/spreadsheets/d/14BJcO6IzT4t4ioryXivFqSEljTDPukmxTaqKV6z10U0!A:Q")}, "WHERE Col2 = '"&TEXTJOIN("' OR Col2 = '", TRUE, A:A), "select Col1, Col2, Col6, Col7, Col8, Col15, Col16, Col17",1)
In summery:
When I put the PalletID in this Sheet I want to have data pulled from Sheet but only the rows,
This will help me to create a full article list, from what is in each Pallet
Thank you
Upvotes: 1
Views: 128
Reputation: 1
use:
=INDEX(IFNA(VLOOKUP(A2:A,
{IMPORTRANGE("14BJcO6IzT4t4ioryXivFqSEljTDPukmxTaqKV6z10U0", "Pallets Total!B:B"),
IMPORTRANGE("14BJcO6IzT4t4ioryXivFqSEljTDPukmxTaqKV6z10U0", "Pallets Total!A:Q")},
{2, 3, 7, 8, 9, 16, 17, 18}, 0)))
=QUERY({IMPORTRANGE("14BJcO6IzT4t4ioryXivFqSEljTDPukmxTaqKV6z10U0", "Pallets Total!A:Q")},
"select Col1,Col2,Col6,Col7,Col8,Col15,Col16,Col17
where Col2 matches '"&TEXTJOIN("|", 1, A2:A)&"'", 0)
Upvotes: 1