I have a Google spreadsheet which has checkboxes in column P, as and when a checkbox is ticked the corresponding row automatically hides.
I am looking to add an additional check box in G1 that will show all hidden rows if checked and if possible a checkbox in E1 to then hide again all the rows that have the checkbox ticked in column P.
Basically I want to automatically hide rows when I tick the checkbox in column P Then later I may need to review the hidden rows by clicking the checkbox in G1. When I am finished reviewing the hidden rows above click a checkbox in E1 and all rows which are checked in column P will hide again.
function onEdit(e){
if (e.range.columnStart != 16 || e.value != "TRUE") return;
SpreadsheetApp.getActiveSheet().hideRows(e.range.rowStart);
}
code
so we can help you better on debugging it. – jpneey