Home > Mobile >  Sheets importrange matching data from multiple sheets
Sheets importrange matching data from multiple sheets

Time:02-26

I have multiply taps in one sheet A, each tap has 5000 rows, some rows have the same content and want to find specific rows, while entering content and copy those rows which are matching to a different sheet B and keep the formatting etc from sheet A.

Example: I need to make a shipping/order list I have 2 sheets Sheet A is full of information (my stockload), multiply tabs with a lot of rows in each tab. in Sheet B (new URL) I want to filter the information.

Lets say, I have 5000 articles spread in 5 tabs on Sheet A, someone is ordering 20 articles, so I just want to scan the EAN or any other code on that article to Sheet B, and all rows with that data, will be imported. Now I have a brand new list with only the 20 articles, which I can share to the client.

I have tried with script:

    function copyRowsWithCopyTo() {
  let spreadSheet = SpreadsheetApp.getActive();
  let sourceSheet = spreadSheet.getSheetByName('Sheet0');
  let sourceRange = sourceSheet.getDataRange();
  let targetSheet = spreadSheet.getSheetByName('Sheet1');
  sourceRange.copyTo(targetSheet.getRange(1, 1));
}

and also tryng with Importrange query, but I cant seem to figure out the keycode, for searching in all the tabs, and lookup/match the new text/code I always provide.

=QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1hAeUokEf-1DQjRYn2iQXCSCwAoRW-C083z5QYXpzq-Y", "1:1000"), "B2 ",0)

output

  • Related