In Google Sheets, I have two completely separate spreadsheet files. In Spreadsheet A, there is a cell with a link to open Spreadsheet B, and vice versa. When I click on the link, the other Spreadsheet opens up just fine. However, it opens up in a new tab. Is there a way to make it open in the same window that I'm working in?
1 Answer
If I understand correctly, you have a single spreadsheet with two sheets, and you want to add a link in a cell in Sheet A that switches the active view to Sheet B.
I believe the HYPERLINK
function will solve your problem. The url
you enter as first parameter to this function should be of the form "#gid=<sheet id>"
where <sheet id>
is the sheet id for Sheet B.
You can find the gid for Sheet B by switching to the sheet in the browser window, and look for the gid=
term at the end of the URL. All Google Sheet URLs take the form https://docs.google.com/spreadsheets/d/<spreadsheetId>/edit#gid=<sheetId>
-
Sorry, I guess I used the wrong terminology. I meant to say spreadsheets, not worksheets. I have two spreadsheets already linked together and the links work just fine. The problem is when I click on a link, it opens up in a new tab. Is there a way to make it open in the same window that I'm working in? Feb 11, 2020 at 23:58