Colors any date in column B that is before today.
function highlightOverdue() {
const sheet = SpreadsheetApp.getActiveSheet();
const range = sheet.getRange(2, 2, sheet.getLastRow() - 1, 1);
const today = new Date(); today.setHours(0, 0, 0, 0);
const colors = range.getValues().map(([d]) => [d instanceof Date && d < today ? '#ffd6d6' : null]);
range.setBackgrounds(colors);
}Undo: Format > Clear formatting on column B.
Reference: Apps Script documentation.
Facts on this page checked December 4, 2026 (Pacific) against the linked official sources.