# How to Insert Excel Sheet Name from Cell Value (3 Easy Ways)

Get FREE Advanced Excel Exercises with Solutions!

In many cases, you may need to use a sheet name from a particular cell value such as creating a sheet name from a cell value, referring to a sheet name from a cell value, and so on. In this article, I’ll introduce you to three ways to insert an Excel sheet name from cell value with multiple examples.

You may download the following Excel workbook for better understanding and practice it by yourself.

## 3 Easy Ways to Insert Excel Sheet Name from Cell Value

This article will demonstrate how to insert Excel sheet names from cell values by combining MID, CELL, and FIND functions, using the INDIRECT function to add cell values, and applying VBA code.

### Method 1: Combining MID, CELL, and FIND Functions to Insert Excel Sheet Name from Cell Value

By using the MID function, the CELL function, and the FIND function altogether, you can insert the Excel sheet name as the Cell Value. Consider the following dataset. Here, we want to insert the excel sheet name “Mark” as the salesman’s name.

Steps:

• Firstly, select cell B5.
• Secondly, type the formula in cell B5.
`=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)`

• After that, by pressing ENTER, you will get the sheet name as the cell value.

• Then, if you change the Sheet Name your cell value will automatically change.

Read More: How to Get Excel Sheet Name (2 Methods)

### Method 2: Using INDIRECT Function to Add Excel Sheet Name from Cell Value

By using the INDIRECT function you can refer to any Excel sheet whose name is inserted as a cell value and extract any particular cell value from that Excel sheet to your current sheet.

Consider the following dataset. Here we want to know the number of laptops sold by different salesmen. We have different sheets named according to the Salesmen. The Sheet names are inserted in cells B6 and B7. In each sheet, we have the number of different items sold by that particular salesman.  Now we will extract the number of laptops sold from different Excel sheets using this Excel sheet name as cell values.

Steps:

• Firstly, choose cell C5.
• Secondly, type the formula in the C5 cell.
`=INDIRECT(B5&"!D5")`

• After that, by pressing Enter, you will get the value of cell D5 from the sheet named “John”.
• Therefore, in a similar way, you can get the value for the sheet named “Antony”.

### Method 3: Applying VBA Code to Insert Sheet Name from Cell Value in Excel

We can create a sheet Name from any cell value by using Visual Basic Application (VBA). Consider the following dataset. Here we will name the sheet as the name of the salesman in cell B5.

Steps:

• Firstly, right-click on the sheet name from the sheet name tab and select View Code.

• Secondly, a new window named Microsoft Visual Basic for Applications will appear. Type the following code in this window,
``````Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set Target = Range("B6")
If Target = " " Then Exit Sub
Application.ActiveSheet.Name = VBA.Left(Target, 31)
Exit Sub
End Sub``````
• Then, save the window and close it.

• After that, the sheet name will be changed to the cell value of B5.

## Conclusion

I hope you are now capable of using sheet names from cell values. If you have any confusion please leave a comment, so I’ll try my best to remove your confusion.

Prantick Bala

Hi, I'm Prantick Bala, currently working and doing research on Microsoft Excel in Softeko.com. I have completed BSc in Naval Architecture and Marine Engineering From Bangladesh University of Engineering and Technology (BUET). Currently I am in the last semester of my MBA at Institute of Business Administration (IBA), Dhaka University (DU). I'm always eager to learn through experience and have a deep interest in solving problem to get optimum solution.

1. Hi! I would like to have a month in sheets, would it be possible to have all the sheets somehow linked so I would have an easier time to change the dates than manually double click every sheet whenever I need to change the month?

• Hi MIRA,
It’s a great pleasure that you are watching our articles. You have a query regarding this article. You want to make an Excel sheet, where the dates of the Excel sheet will change according to the sheet name. Yes, you can do this. Read the below steps to get your solution.

Steps:
● First, take an Excel sheet with the Date and Attendance columns.

We will insert dates in the Date column based on the Sheet Name.
● Before that, we will form a table that consists of the month’s name and serial number.

● Now, go to Cell E5 and put in the following formula.

`=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)`

It will extract the name of the Sheet which is a month name.

Formula Explanation:
CELL(“filename”,A1)
This finds the location of the Excel file with the Sheet name.
Result:
D:\Alok\[Excel-Sheet-Name-From-Cell-Value.xlsx]January

FIND(“]”,CELL(“filename”,A1))
This will find out the location of the symbol mentioned in the formula from the location.
Result: 47

FIND(“]”,CELL(“filename”,A1))+1
Add 1 with the previous result.
Result: 48

MID(CELL(“filename”,A1),FIND(“]”,CELL(“filename”,A1))+1,256)
Separate the sheet name from the location.
Result: January

● After that, put the following formula on Cell F5.
=INDEX(Month,MATCH(E5,Month[Month],0),2)

This returns the serial number of the month comparing the values of the table.
● Now, use the DATE function on Cell B5.

=DATE(2022,\$F\$5,1)

● Fill up the Date and Attendance columns.

● Now, change the sheet name from January to February and look at the changes that take place in the Date column.