Search first row for matching date
Mon May 23 2022 04:37:39 GMT+0000 (Coordinated Universal Time)
Saved by
@bobgorbold
//starting date
let dateStartTemp = sheet.getCell(1,0).getValue();
//how many days after Monday?
let dateCalculator = (dateStartTemp - 2)%7;
//Date of the Monday of that week
let dateStart = dateStartTemp - dateCalculator;
//The row I want to search
let findRow = rangeSummary.getRow(0);
let findRowVal = findRow.getValues();
let startCell = -1;
for(let i=1; i<colCount; i++){
if(findRowVal[0][i]===dateStart){
startCell = i;
}
}
if(startCell === -1){
console.log("could not find date!")
}
content_copyCOPY
Comments