I have a loop which defines arrays with changing variables - start row and row numbers always changing. I would need to be able to access certain columns within this array, but I have no idea how to do that.
var nameRowN = starting row numbers already in an array
var sor = number of rows in each mini array (which is arej variable) already calculated and put in an array
for (var m = 0; m < nameRowN.length; m++) {
arej[m] = sourcesheet.getRange(nameRowN[m],5,sor[m]-1,29).getValues();
}
For example, arej[0] gives me this:
[20-01-07 11:35:33:289 GMT] arej: ,water outlet,,,,,,,,,,,,,,,,,,,,,,,,,,,,Chlorine content,,,,,1 / day alternate,,ASTM,,,,,NSP,,,Sat 1899,,0.2,,,,ppm,,,2ppm,,,,,WATER,,,,,,,,,,,,,,,,,,,,,,,,,,,,
The empty cells are fine, because they're always the same amount at the same place. I need to access certain data from these arrays, which are always in the same column, sometimes through multiple rows. In the above example, it's in 3 rows. I'm stuck as I don't know what to do with this.
getRange().getValues()calls). Consider instead using aRangeListto convert multiple A1- or R1C1-style strings intoRanges, or just callinggetValues()on the whole sheet and usingArray#filterto remove the rows you dont care about