I understand that this question has been asked before but most users seem to only have the dates in one column or a limited number. The sheet I am trying to work with has the schedule for one entire year and the dates are in cells that have been combined, ie cells F-H show a single date, cells I-AJ show another date. I have determined that the columns with the dates range from F:EU and have a Row range of 4:2900; starting with row 4 then moving down to row 55, 106,157,208 etc until they reach row 2809.
Is there anyway to jump to todays date when opening this sheet?
Failing script
I have been trying to use something that was posted by another user but I cannot get it to work due to the fact the sheet covers so many columns and rows for the dates.
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var s = ss.getSheetByName("Annual Schedule"); // change to sheet containing dates
var r = s.getRange("F2").getValue(); //change A1 to cell containing =match formula
s.setActiveSelection(s.getRange("A" + r ));
}
Best Answer
You have a spreadsheet with dates for the entire year in various columns in the range "F:EU" and rows 6-2900. When the spreadsheet is opened, you wish to automatically move the cursor to the column corresponding to "todays" date.
Enter
=Today()
in Cell A3.Enter the following code in the Script editor.
Add the script
jumptotoday
to your button.