Within Google Sheets I need a script to hide rows automatically in sheet 1 when the date in column A is equal to or before today's date.
so if today is August 29, 2018 and the date in cell A3 is August 28, 2018 all of Row 3 will be hidden
But if the date was August 30, 2018 in cell A3 then all of Row 3 would b visible until the current date is August 31, 2018.
thank you for any help you can provide.
I have been working with this code which I found which hides rows, not in the current month I can't seem to Figure out how to modify it to look at the current day and hide rows which are older than the current date.
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var menuItems=[{name: 'HideRows', functionName: 'hideRows'}];
ss.addMenu('Script', menuItems);
};
function hideRows() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var s = ss.getSheetByName("Sheet1");
var v = s.getRange("A:A").getValues();
var today = new Date();
var m = today.getMonth();
for(var i=3;i<v.length;i++)
if(v[i][0]=="" || v[i][0].getMonth()>=m) break;
if(i>3) s.hideRows(4,i-3)
};