I believe your goal is as follows.
- When the user changes the dropdown list of column "C" of "Sheet1" to "Completed", you don't want to make the user change it again.
In this case, how about protecting the cell? When this is reflected in a sample script, it becomes as follows.
Sample script:
In this case, the installable OnEdit trigger is used. So, please install the OnEdit trigger to the function installedOnEdit
.
When you use this script, please change the dropdown list of column "C" of "Sheet1" to "Completed" by the user who is not the owner of Spreadsheet. By this, the cell is protected.
In the case of the owner of Spreadsheet, the owner can change the protected dropdown list. When the owner changes the dropdown list from "Completed" to another value, the protection is removed.
function installedOnEdit(e) {
const range = e.range;
const sheet = range.getSheet();
if (sheet.getSheetName() != "Sheet1" || range.columnStart != 3) return;
const p = sheet.getProtections(SpreadsheetApp.ProtectionType.RANGE).find(r => r.getRange().getRow() == range.rowStart);
if (!p && range.getValue() == "Completed") {
const p = range.protect();
p.removeEditors(p.getEditors());
if (p.canDomainEdit()) p.setDomainEdit(false);
} else if (p) {
p.remove();
}
}
References: