Google-sheets – How to apply conditional data validation when a cell with a defined value is changed

data validationformulasgoogle sheets

I have a spreadsheet that's basically a grid checklist, let's say 10 columns and 20 rows.

There are multiple cells that have N/A as the value, and I'm worried going through the checklist that one might accidentally be changed.

So I'd like to protect all cells that equal N/A and show a warning if that value is changed. However other cells that do not have N/A should not be validated.

Is this possible, without or with a script?

Best Answer

  • without a script, you can set up data validation with a custom formula =COUNTIF(A1,"=N/A")

  • and then copy A1 cell, select all cells in the grid and paste only data validation: