Home > database >  Array Vlookup Importrange to get the Data from different Sheet
Array Vlookup Importrange to get the Data from different Sheet

Time:11-11

I am using below formula which is working very fine. But it is just loading the single column Data which is Column W3:W500 I want to get the other columns Data as well that are X, Y, Z and AA, AB.

I tried by expanding this range W3:W500 to W3:AA500 but nothing worked. Your help will be appreciated.

Formula Sheet

Data Sheets

=ArrayFormula(IF(B3:B501="",,vlookup(trim(B3:B501&" "&C3:C501&" "&text(F3:F501, "mm/dd/yyyy")&" "&G3:G501), {transpose(QUERY(TRANSPOSE(query(IMPORTRANGE("Sheetname","Sheet1!A3:W500"), "Select Col2, Col3, Col6, Col7")),,9^9)), IMPORTRANGE("Sheetname","Sheet1!W3:AA500")} ,2,0)))

CodePudding user response:

You only requested column 2 to be returned at the end of your VLOOKUP, i.e., ,2,0).

See the newly added "Erik Help" sheet, where I replaced your 2 (ie., your request for only the second column of data) with {2,3,4,5} (i.e., a request for columns 2, 3, 4 and 5 of data).

I'm confused, however, as to why you are requesting A3:W500 in your first IMPORTRANGE call, if you only need the data from A3:G500; and likewise, why you are calling for W3:AA500 in the second IMPORTRANGE, if you only need W3:Z500.

  • Related