Google Sheet App Script For next LOOP error [closed]
Want to generate a loop for picking next symbols from Table A in Sheet "RANK!R9:S".
Then want to copy every next row symbol to "PF Sheet!B20" (cell only) for 1st Loop. This is going to generate a new set of values in "PF Sheet!D16:D", for each value copied to "PF Sheet!B20" cell.
Pl. refer the google Sheet link
https://docs.google.com/spreadsheets/d/1r0_oHLTcT9tmTJPgKVgkGwGWhooBM8uluwmWcC92eOk/edit?usp=sharing
function permutation() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var rank = ss.getSheetByName('Rank');
var pf_sheet = ss.getSheetByName('PF Sheet');
var symbols = pf_sheet.getRange('B20')
var start = rank.getRange('S9');
var end = rank.getRange('S4');
rownum = start.getRowIndex()
rowTarget = end.getValue()
for (let i = rownum; i <= rowTarget; i++) {
var value = rank.getRange(i+1,19,).getValue();
value.getValue().copyTo(symbols());
// wait to complete all the changes on the spreadsheet
SpreadsheetApp.flush();
var start_2 = 2
var end_2 = pf_sheet.getRange('D10').getValue()
for (let i = start_2; i <= end_2; i++) {
Logger.log(symbols,start_1)
}
}
}
Error Line 16
Comments
Post a Comment