Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Google Sheets formula to put the name of the sheet into a cell?

The following illustration should help:

enter image description here

like image 421
orschiro Avatar asked Aug 04 '17 09:08

orschiro


People also ask

How do I pull a sheet name into a cell?

Go to the cell which you want to reference the current sheet tab name, please enter =TabName() and then press the Enter key. Then the current sheet tab name will be display in the cell.

How do you reference a sheet in Google Sheets?

Type = followed by the sheet name, an exclamation point, and the cell being copied. For example, =Sheet1! A1 or ='Sheet number two'! B4 .

How do you add a sheet name in Google Sheets?

Click the tab of the sheet you want to rename. Select Rename... from the menu that appears. Type the desired name for the sheet. Click anywhere outside of the tab or press Enter on your keyboard when you're finished, and the sheet will be renamed.


1 Answers

Here is what I found for Google Sheets:

To get the current sheet name in Google sheets, the following simple script can help you without entering the name manually, please do as this:

  1. Click Tools > Script editor

  2. In the opened project window, copy and paste the below script code into the blank Code window, see screenshot:

......................

function sheetName() {   return SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().getName(); } 

Then save the code window, and go back to the sheet that you want to get its name, then enter this formula: =sheetName() in a cell, and press Enter key, the sheet name will be displayed at once.

See this link with added screenshots: https://www.extendoffice.com/documents/excel/5222-google-sheets-get-list-of-sheets.html

like image 130
Katya Mutafchieva Avatar answered Sep 18 '22 18:09

Katya Mutafchieva