Skip to content

Add sheet name support to CELLREF formula #76

@Jython1415

Description

@Jython1415

Description

Enhance the CELLREF formula to optionally include the sheet name in the cell reference output (e.g., 'Sheet1'!N6 instead of just N6).

Context

Follows up on #74, which introduced the basic CELLREF formula for converting cells to A1 notation.

Technical Feasibility

Challenge: Google Sheets has no native formula to get the current sheet name. The ADDRESS function accepts a sheet name as the 5th parameter, but obtaining it programmatically requires:

  • Google Apps Script custom function (e.g., =sheetName())
  • Manual input as a parameter

Approach: Accept an optional sheet_name parameter that users can provide manually or via a custom Apps Script function.

Research findings:

  • Google Sheets has no native formula to get the current sheet name (unlike Excel's CELL function)
  • The only workaround is Google Apps Script: function sheetName() { return SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().getName(); }
  • Custom functions are cached and don't auto-update when sheets are renamed

Related

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions