0

I am trying to hide a row of cell when a specific cell is filled in on Google Sheets

For example:

On row 2 cell E2 is filled in with "1", I want to be able to hide the entire second row.

Is there a possible way of doing this?

0

You need a script for this. This script runs on every edit (onEdit), checks whether the edit is in the 5th column (E), and if the new value is 1, then it hides the row of that cell.

function onEdit(e) {
  if (e.range.getColumn() == 5 && e.value == 1) {
    e.range.getSheet().hideRows(e.range.getRow());
  }
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.