Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

How to trigger "hide" a row in Conditional Formatting/ Custom Rule

Writer 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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.