When clicking "button1" I would like the code to check the First Cell (Column A) of Rows 38-58 and hide the Row if the corresponding cell is empty and show if it isn't.
Empty in this case means the cell still has a formula but is just blank. If that's not possible, the "Hide Condition" can be Cells that are not a number.
I'd like to combine it with the code below, which hides and shows Rows 10 and 11 when Cell C4 and D4 equal 0 respectively.
function button2(){
var ss = SpreadsheetApp.getActive();
var sheet = ss.getActiveSheet();
var cellRef1 = "C4";
var cellRef2 = "D4";
var cell1 = sheet.getRange(cellRef1);
var cell2 = sheet.getRange(cellRef2);
var value1 = cell1.getValue();
var value2 = cell2.getValue();
if (value1 == "0"){
sheet.hideRows(10);
}
if (value2 == "0"){
sheet.hideRows(11);
}
if (value1 != "0"){
sheet.showRows(10);
}
if (value2 != "0"){
sheet.showRows(11);
};
};