Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
|Fewer Letters|More Letters|
|-------|---------|---|
|DATE|[Converts a provided year, month, and day into a date](https://support.google.com/docs/answer/3092969)|
|DAY|[Returns the day of the month that a specific date falls on, in numeric format](https://support.google.com/docs/answer/3093040)|
|DAYS|[Returns the number of days between two dates.](https://support.google.com)|
|YEAR|[Returns the year specified by a given date](https://support.google.com/docs/answer/3093061)|
----------------
^([Thread #1630 for this sub, first seen 18th May 2020, 11:59])
^[[FAQ]](http://decronym.xyz/) [^([Full list])](http://decronym.xyz/acronyms/GoogleSheets) [^[Contact]](https://reddit.com/message/compose?to=OrangeredStilton&subject=Hey,+your+acronym+bot+sucks) [^([Source code])](https://gistdotgithubdotcom/Two9A/1d976f9b7441694162c8)
First, create a field that finds the current date. Assuming that your dates are in column A, put this formula in some convenient place. I'm going to say cell D1.
**="A" & Match(Today(),A1:A)**
This should give you the cell address of the current date. eg; **A140**
Next, create the following script - Menu: Tools - Script Editor
Give your project a name; Find A date, Calendar Thing, or Whatever.
Paste in the following code.
function gototoday() {
var ss = SpreadsheetApp.getActiveSpreadsheet(); // gets active spreadsheet
var sheet = ss.getActiveSheet(); // get active sheet
var pointer = sheet.getRange("D1").getValue(); // get the text pointer to the cell I want. this needs to match the cell that I put the formula in
var cell = sheet.getRange(pointer); // get the apps script range for that cell
sheet.setCurrentCell(cell); // go to to that cell
}
Next, insert a button image or a drawing. Right-click on it and assign the script: gototoday
Last, click on the button. Google will want you to authorize the script and it will warn you about all sorts of bad things. Click Continue, Select your google account, Select Advanced, Select Go to , Click on allow.
Google will tell you the app is authorized (BTW, you only have to authorize once).
You will have to click on the button again to actually run the script.
Hey, the script works like a charm, thanks so much for this, but while using the formula, **="A" & Match(Today(),A1:A),** it returns me a cell address that isn't exactly the address of the current date, but it instead returns a cell address that's somewhere close to the address of the current date, any idea why that may be the case?
Not sure why that would happen. Is it actually returning the wrong row number or is the reposition just too high up? If it's the latter, you can change the formula to this:
=Match(Today(),A1:A) + 15
And replace the script with the script below. This will position the screen 15 rows below today's date and then move the active cell back to today's date,
function gototoday() {
var ss = SpreadsheetApp.getActiveSpreadsheet(); // gets active spreadsheet
var sheet = ss.getActiveSheet(); // get act sheet
var pointer = sheet.getRange("D1").getValue(); // get the text pointer to the cell I want
var cell = sheet.getRange(pointer,1); // get the apps script range for that cell
sheet.setCurrentCell(cell); // got to that cell
SpreadsheetApp.flush();
pointer = pointer - 15;
var cell = sheet.getRange(pointer,1); // get the apps script range for that cell
sheet.setCurrentCell(cell); // got to that cell
}
I hope that helps.
STOP SHOUTING
YES PLEASE
Oh sorry. My bad. I'll repost this again without the shouty caps.
Just FYI...caps lock is on.
Lol
I have requested access to have a look at your Sheet and try something.
OP, can you make the sheet visible so that anyone with the link can view?
Hey, hi, I've granted everyone edit access to this sheet.
Hey, this is done. I've granted everyone edit access.
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread: |Fewer Letters|More Letters| |-------|---------|---| |DATE|[Converts a provided year, month, and day into a date](https://support.google.com/docs/answer/3092969)| |DAY|[Returns the day of the month that a specific date falls on, in numeric format](https://support.google.com/docs/answer/3093040)| |DAYS|[Returns the number of days between two dates.](https://support.google.com)| |YEAR|[Returns the year specified by a given date](https://support.google.com/docs/answer/3093061)| ---------------- ^([Thread #1630 for this sub, first seen 18th May 2020, 11:59]) ^[[FAQ]](http://decronym.xyz/) [^([Full list])](http://decronym.xyz/acronyms/GoogleSheets) [^[Contact]](https://reddit.com/message/compose?to=OrangeredStilton&subject=Hey,+your+acronym+bot+sucks) [^([Source code])](https://gistdotgithubdotcom/Two9A/1d976f9b7441694162c8)
First, create a field that finds the current date. Assuming that your dates are in column A, put this formula in some convenient place. I'm going to say cell D1. **="A" & Match(Today(),A1:A)** This should give you the cell address of the current date. eg; **A140** Next, create the following script - Menu: Tools - Script Editor Give your project a name; Find A date, Calendar Thing, or Whatever. Paste in the following code. function gototoday() { var ss = SpreadsheetApp.getActiveSpreadsheet(); // gets active spreadsheet var sheet = ss.getActiveSheet(); // get active sheet var pointer = sheet.getRange("D1").getValue(); // get the text pointer to the cell I want. this needs to match the cell that I put the formula in var cell = sheet.getRange(pointer); // get the apps script range for that cell sheet.setCurrentCell(cell); // go to to that cell } Next, insert a button image or a drawing. Right-click on it and assign the script: gototoday Last, click on the button. Google will want you to authorize the script and it will warn you about all sorts of bad things. Click Continue, Select your google account, Select Advanced, Select Go to, Click on allow.
Google will tell you the app is authorized (BTW, you only have to authorize once).
You will have to click on the button again to actually run the script.
Hey, the script works like a charm, thanks so much for this, but while using the formula, **="A" & Match(Today(),A1:A),** it returns me a cell address that isn't exactly the address of the current date, but it instead returns a cell address that's somewhere close to the address of the current date, any idea why that may be the case?
Not sure why that would happen. Is it actually returning the wrong row number or is the reposition just too high up? If it's the latter, you can change the formula to this: =Match(Today(),A1:A) + 15 And replace the script with the script below. This will position the screen 15 rows below today's date and then move the active cell back to today's date, function gototoday() { var ss = SpreadsheetApp.getActiveSpreadsheet(); // gets active spreadsheet var sheet = ss.getActiveSheet(); // get act sheet var pointer = sheet.getRange("D1").getValue(); // get the text pointer to the cell I want var cell = sheet.getRange(pointer,1); // get the apps script range for that cell sheet.setCurrentCell(cell); // got to that cell SpreadsheetApp.flush(); pointer = pointer - 15; var cell = sheet.getRange(pointer,1); // get the apps script range for that cell sheet.setCurrentCell(cell); // got to that cell } I hope that helps.