As another user answered, Google finally added a feature to Google Sheets (GS) spreadsheets to allow linking directly to cells. The feature is intended for linking to ranges of cells, but specifying single cells works, too. GS also supports linking to named ranges of cells in a spreadsheet, but that feature requires a little more work to use than the range of cells by address feature. The extra effort may be worthwhile, though.
💡 Note:
- A random spreadsheet is used for the examples below.
- Google Docs URLs usually include
/edit
immediately after the long document ID string. Those are annoying, because they take up space and they're unnecessary. If the URL doesn't include /edit
, Google Docs will usually open the document in edit mode anyway. They've been left out of the URLs in the examples below.
Link to: A single cell in a sheet
- Click on the spreadsheet cell to be referenced. For example, cell C7.
- Open the contextual menu (using secondary click: right-click, ctrl-click, etc.).
- Scroll down the menu and click on the "Get link to this cell" item. The message "The link has been copied to the clipboard" will be shown.
Paste the link's URL from the clipboard anywhere it's needed. It will be similar to:
https://docs.google.com/spreadsheets/d/1yk6W3iyZM7JKffsRTjPhm9I_PWerrJbltoHZ37Tqdh0#gid=2021414981&range=C7
Some things to notice about the arguments contained in the fragment identifier of this URL:
gid=
– This is the ID of a sheet in the spreadsheet. New spreadsheets have one sheet with the ID 0
. The ID of the currently visible sheet is usually shown in the browser's URL bar.
range=
– This is the address of the referenced cell, in "A1 format" (column letter and cell number).
The contextual menu seems to be the only way in the GS UI to get cell URLs. There aren't any other menu items that do this.
Link to: A range of cells in a sheet
- Highlight a range of spreadsheet cells to be referenced. For example, cells C7 through D13.
- Open the contextual menu.
- Scroll down the menu and click on the "Get link to this range" item. The message "The link has been copied to the clipboard" will be shown.
Paste the link's URL from the clipboard anywhere it's needed. It will be similar to:
https://docs.google.com/spreadsheets/d/1yk6W3iyZM7JKffsRTjPhm9I_PWerrJbltoHZ37Tqdh0#gid=2021414981&range=C7:D13
💡 Note: To select a group of non-empty, contiguous cells in a sheet, click on one cell in the group, then press the "select all" keyboard shortcut (command-A, ctrl-A, etc.). Depending on the contents of the nearby cells, either a range of cells or all cells in the sheet will be selected. For example, in cell C7 of the example spreadsheet, this method selected cells in the range A1:K28.
Link to: All cells in a sheet
💡 In this and the following sections, instructions for getting the URL are abbreviated. Only the first step, the selection of cells, is described. See the previous section for detailed instructions.
On the box to the left of column letter "A" and row number "1", open the contextual menu, then click on the "Get link to this range" item.
The URL will be similar to:
https://docs.google.com/spreadsheets/d/1yk6W3iyZM7JKffsRTjPhm9I_PWerrJbltoHZ37Tqdh0#gid=2021414981&range=1:605
Note that the range is only row numbers, starting with 1 and going to the highest row number. When a range of only row numbers is given, all columns within those rows are included in the range.
Link to: Range of either columns or rows
Select one or more column letter or row number labels.
The URL will be similar to:
Link to: A named range
Linking to a named range is trickier than getting the link to a range of cells by address. GS doesn't have a feature to link directly to the named range. Using the name of a named range in the range=
argument doesn't work. Follow these steps to get a working link URL for a named range:
- Be sure the spreadsheet has a named range in it. If it doesn't, create one. (E.g., in the example spreadsheet, the range named "judgenames" was defined as "C1:C", which GS saves as "C1:C605".)
- Click on an empty cell of the spreadsheet.
- Use the "Insert link" feature (i.e., from the Insert > Link... menu item, from the "Insert link" contextual menu item, the keyboard shortcut command-K or ctrl-K, etc.).
- In the link editor box that appears, click "Named ranges in this spreadsheet", then click the name of a range shown below it (e.g., "judgenames")
- Click the "Apply" button.
- Move the pointer over the new link. A popup showing part of the URL will appear (e.g.,
#rangeid=1332253898
).
Copy that new link from the popup by either:
- Copying the link text and using it in place of the fragment identifier in the URL of the current spreadsheet.
- Copy the link address. (The wording used by Google Chrome.)
These methods will vary from browser to browser.
The URL will be similar to:
https://docs.google.com/spreadsheets/d/1yk6W3iyZM7JKffsRTjPhm9I_PWerrJbltoHZ37Tqdh0#rangeid=1332253898
Some things to notice about the arguments contained in the fragment identifier of this URL:
rangeid=
– This argument is used instead of the range=
one found in links to a range of cell addresses.
gid=
- This argument isn't used. That's probably because the ID of a named range is sufficient to specify both a sheet ID and a range of its cells.
💡 Why is it worth the effort to use a named range?
When a URL refers to a GS named range, the spreadsheet will open and focus will be placed on whichever cell range the named range refers at the present time. When the "judgenames" range was originally defined, it was for the range "C1:C605", which will receive focus when the spreadsheet is opened. However, imagine the "judgenames" range is redefined, to say "D1:D5". The next time this same URL is used to open the spreadsheet, the new range will receive focus, not the old one.
Link to: A sheet
Finally, the simplest link of all, a specific sheet in a spreadsheet. The simplest way to get this is to select a sheet in the spreadsheet, then copy the URL from the address bar of the web browser.
The URL for a sheet is similar to that of a cell range. It only lacks the range=
argument of the fragment identifier:
https://docs.google.com/spreadsheets/d/1yk6W3iyZM7JKffsRTjPhm9I_PWerrJbltoHZ37Tqdh0#gid=583749522
Linking to a nonexistent sheet will usually cause GS to open the default sheet of the spreadsheet, the first sheet.