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?
Web Applications Stack Exchange is a question and answer site for power users of web applications. It only takes a minute to sign up.
Sign up to join this communityI 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?
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());
}
}