There are times when you are working on a massive data set in Google Sheets and you have to leave your work unfinished. Wouldn’t it be great if you could just pick up right where you left off? In this blog post, we will walk you through the steps to ensure that when you reopen your Google Sheets, you start right where you left off.
Using Bookmarks
The simplest way to have Google Sheets open where you left off is by using the bookmark feature built into your web browser. This method does not require any coding or usage of Google Apps Script.
By creating a bookmark, you are essentially saving a URL. When you are in a Google Sheet, the URL in the address bar is specific to your cursor’s current position in the sheet. So, if you bookmark this URL, you can return to the same cell when you open this bookmark.
Using Google Apps Script
For a more advanced and automatic method, you can use Google Apps Script to save the active cell every time you leave the sheet and load that cell when you go back to the sheet. Here’s how:
[
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var cell = PropertiesService.getDocumentProperties().getProperty(‘lastActiveCell’);
if(cell){
ss.getRange(cell).activate();
}
}
function onEdit() {
var cell = SpreadsheetApp.getCurrentCell().getA1Notation();
PropertiesService.getDocumentProperties().setProperty(‘lastActiveCell’, cell);
}
[]
In the code above, the onOpen() function runs automatically when you open the Google Sheet. It retrieves the saved cell address from the document properties and activates that cell. The onEdit() function runs every time you make an edit in the sheet. It gets the address of the currently active cell and saves it in the document properties.
Conclusion
With these two methods, you are now equipped to have Google Sheets open exactly where you left off. Choose the method that works best for you and never lose your place in Google Sheets again.