Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function copypaste() {
- var ss = SpreadsheetApp.getActiveSpreadsheet();
- var sheet1 = ss.getSheetByName("FMGXfers");
- var sheet2 = ss.getSheetByName("FMGInventory");
- var numRows = sheet1.getRange('R1').getDisplayValue();
- var index = 3
- var sourceCell = 'T'+index;
- var sourceRef = 'U'+index;
- var targetCell = sheet1.getRange(sourceRef).getDisplayValue();
- var sourceValue = sheet1.getRange(sourceCell).getValues();
- for (var i=1; i<numRows; i++) {
- sheet2.getRange(targetCell).setValues(sourceValue);
- var index = index++;
- var sourceCell = 'T'+index;
- var sourceRef = 'U'+index;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement