I am trying to iterate through the arrays and copy the values to a table. The gamesArrayList are (Home and away teams) that get copied into B2:B3 for an algorithm to get processed then C5:E6 is the area where the first games "statistics" go and then I need it to go to game 2 C7:E8, game 3 C9:E10, etc. The teams are all different. I have been working on it for 5 hours and am very stuck. Any direction will helps, thanks! (I know this is a very easy question, but I do not do this for a living.)
function RunAlgo(){
var ss = SpreadsheetApp.getActiveSpreadsheet();
var s = ss.getSheets()[0];
var gamesArrayList = s.getRangeList(['B5:B6', 'B7:B8', 'B9:B10']);
var gamesArray = gamesArrayList.getRanges();
var gameDataList = sheet.getRangeList(['C5:E6', 'C7:E8','C9:E10']);
var gameData = gameDataList.getRanges();
for (var i in gamesArray) {
gamesArray[i].copyTo(ss.getRange('B2:B3'), {contentsOnly:true});
testWait();
for (var i in gameData) {
ss.getRange('G2:I3').copyTo(gameData([i]), {contentsOnly:true});
testWait();
}
}
}