Bonjour,
Une solution pour tout mettre en gras en une fois :
function lignesEnGras() {
const f = SpreadsheetApp.getActiveSheet();
f.getDataRange().setFontWeight('normal');
const maxLigne = f.getLastRow();
const p = f.getRange('O1:O' + maxLigne).getValues();
for (let i = 1; i <= maxLigne; i++) {
p[i - 1][0] == 1 && f.getRange(i + ':' + i).setFontWeight('bold');
}
}
Une solution pour mettre en gras lorsqu'il y a des changements :
function onEdit(e) {
if (e.range.getColumn() === 15) {
const ligne = e.range.getRow();
e.range.getSheet().getRange(ligne + ':' + ligne).setFontWeight(e.value == 1 ? 'bold' : 'normal');
}
}
Cordialement,