Hyperlink to a specific sheet

后端 未结 6 2043
猫巷女王i
猫巷女王i 2021-02-08 01:45

I would like to open a specific sheet of a Google Sheets from a hyperlink in another spreadsheet.

I have different links in my master spreadsheet and each should have a

6条回答
  •  耶瑟儿~
    2021-02-08 02:28

    I personnaly did this based on what @rejthy said: In scripts I created this function:

    /**
     * Return the id of the sheet. (by name)
     *
     * @return The ID of the sheet
     * @customfunction
     */
    function GET_SHEET_ID(sheetName) {
        var sheetId = SpreadsheetApp.getActive().getSheetByName(sheetName).getSheetId();
        return sheetId;
    }
    

    and then in my sheet where I need the link I did this: =HYPERLINK("#gid="&GET_SHEET_ID("Factures - "&$B$1);"Année en cours")

提交回复
热议问题