How to trigger "hide" a row in Conditional Formatting/ Custom Rule
Sophia Terry
I am looking to remove (hide) a row from view if certain condition hits. How can this be accomplished, please?
2 Answers
Something like this
function myFunction() { var sheet = SpreadsheetApp.getActiveSheet(); var condition = true; if (condition) sheet.hideRow(sheet.getRange("A1"));
} 2 Google Sheets does not support hiding rows using a conditional formatting rule. What you can do is to hide values by using conditional formatting to set the text color of their cells to white (or whatever the cell fill color happens to be).
To hide rows, you will need a script. You may want to look into an onEdit(e) simple trigger that runs automatically when you hand edit the spreadsheet.