How to navigate to a specific sheet in Google Sheets based upon a cell value

Posted on

How to navigate to a specific sheet in Google Sheets based upon a cell value – Whether you’re just starting out with Google Sheets or are a seasoned pro, sooner or later one of your formulas will give you a formula or script parse error message rather than the result you want. However, every Formula user, irrespective of whether it’s a beginner or expert, has invariably come across a formula parse error in Google Sheets at least once in their life (and if you haven’t. you soon will). It can be frustrating, especially if it’s a longer formula where the formula parse error may not be obvious. In this article, we will talk about some common script or formula parse errors in Google Sheets, like How to navigate to a specific sheet in Google Sheets based upon a cell value, and how to fix it.

What I am hoping to do is take the =Now() date that is located on my default sheet and in the Row 1 Column 1 cell and somehow when the sheet is accessed onOpen() have it automatically change the active sheet to the tab that matches the current date.

I am a teacher at a behavior school and I created a digital pointsheet my students are having difficulty navigating. I am hoping that a google script can help me. I have asked around and researched the topic, but have not as of now found something that works. Thanks for your time and insights!

Here is an example sheet of what I would like to have Example Form

I feel like the script on this page should work with some tweaking, however I am having difficulty with formatting the date in a way that coincides with the tabs. Here is the link to the script I have been working with trying to create something that meets my needs.
Possible Script

Answer :

When Apps Script read a date from a cell it pass a JavaScript object but the sheet names are strings. You could use Utilities.formatDate.

Leave a Reply

Your email address will not be published. Required fields are marked *