Question: Google Sheet Code (Javascript) Link: https://docs.google.com/spreadsheets/d/1oNwWnIrmW5alBsXiKDwDu0ImIgdzb81HBwuGa-qBb00/edit?usp=sharing I would like a row in sheet1 (main) to be copied from column A to K when a certain
Google Sheet Code (Javascript) Link: https://docs.google.com/spreadsheets/d/1oNwWnIrmW5alBsXiKDwDu0ImIgdzb81HBwuGa-qBb00/edit?usp=sharing I would like a row in sheet1 (main) to be copied from column A to K when a certain condition is entered in cell L of that row, If column L contains 'up' is should be copied to the next available row sheet2 (Sub). if column L on sheet1 (Main) is changed from 'up' to 'down' then should be removed from Sheet2 (Sub) and copied to Sheet3 (Done) and vice versa.
you will find bellow a code, but its not working its copying all the entries from Sheet( Main ) Either up or down to only Sheet( Done ).
Code:
function copyrange() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheetByName('Main'); //source sheet var testrange = sheet.getRange('L:L'); var testvalue = (testrange.getValues()); var csh = ss.getSheetByName('Sub'); //destination sheet var sch = ss.getSheetByName('Done'); //destination sheet var data = []; var j =[]; //Condition check in L:L; If true copy the same row to data array for (i=0; i Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
