function onEdit(e) {
var sheet = e.source.getActiveSheet();
var editedCell = e.range;
if (editedCell.getColumn() == 2) {
var value = editedCell.getValue();
if (value == "Готово") {
sheet.hideRows(editedCell.getRow());
}
}
}
=arrayformula(let(
states;J2:J;
sums;K2:K;
states_;{"Премия"; "Штраф"};
coeffs_;{1 ; -1 };
coeff;lambda(state;ЕСЛИОШИБКА(ВПР(state;{states_\coeffs_};2;0);1));
out;sums*coeff(states);
ЕСЛИ(states="";;out)
))
=9,5/24