function onEdit(e) {
var feuillelundi = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(“Lundi”);
var range = SpreadsheetApp.getActiveSheet().getActiveRange();
var cours, joueurs, coach, motifannul
var ligne = range.getRow();
for (var groupe=3;groupe<118;groupe = groupe +12) {
cours = feuille.getRange(ligne,groupe);
coach = feuille.getRange(ligne,groupe – 1);
motifannul = feuille.getRange(ligne,groupe + 1);
for (var j=2;j<9;j++) {
joueurs = feuille.getRange(ligne,groupe + j);
if (!cours.getValue()) {
coach.setValue('REMPLIR');
}
if (cours.getValue()) {
motifannul.setValue('REMPLIR');
}
if (!cours.getValue() && joueurs.getValue()) {
joueurs.setValue('FALSE');
}
}
}
}
Go to Source
Author: icekio