Google-sheets – How to stop Google Sheets from opening new tabs

google sheets

In Google Sheets, I have two completely separate worksheets. In Worksheet A, there is a cell with a link to open Worksheet B, and vice versa. When I click on the link, the other worksheet 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?

Best 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>