//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!") }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter