G Develop
unread,Oct 2, 2022, 12:31:20 AM10/2/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message as abuse
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Apps Script Community
Hello,
I'm a beginer in js & google apps script and trying to get this done to no avail...
I've divided my google sheet in 3 working zones [Range1(E:I), Range2(J:N), Range3(O:S)]
so, I'm trying to write a script to hide and unhide each range in the way that
if Range1 is showing/unhidden, Range2 & Range3 should be hidden and so should it be for the other 2 ranges...
The script I tried to write(see below) for Range1 returns no error; but won't do anything either
Please your contribution and help will be apprciated...
=============
function hideRange1(){
var wb= SpreadsheetApp.getActiveSpreadsheet();
var sh= wb.getActiveSheet();
var range1= homesh.getActiveRange(E:I);
if (range1.getA1Notation() !="E1:I") return;
if(range1=="True"){
SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().hideColumns(10, 19);
}
else if (range1 == "FALSE") {
SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().showColumns(10, 19);
}
}