Select and copy some values from spreadsheet comparing to another column on another sheet

后端 未结 1 422
情深已故
情深已故 2021-01-25 16:24

I have read these two links Google Script: Conditionally copy rows from one spreadsheet to another and https://stackoverflow.com/a/4809413/1526044 and after trying I am not able

1条回答
  •  花落未央
    2021-01-25 16:54

    I modified a similar script I answered recently that should do what you need. I didn't test but you can give it a try. There are some comments to explain the idea... it probably needs some debugging.

    EDIT : I played around with this and debugged it a bit more ;-) so it seems to work as needed now - here is the link to my test sheet

    function xxx(){ 
    /* we have an array 'keysheet'
        and an array datasheet , you get these with something like*/
            var keysheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0].getDataRange().getValues();
        // and
            var datasheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[1].getDataRange().getValues();// if other columns, change index values in the arrays : 0=A, 1=B ...
        // the iteration could be like this :
                  for(i=0;i

    0 讨论(0)
提交回复
热议问题