In many cases, you may need to use an Excel sheet name from a particular cell value such as creating an excel sheet name from a cell value, referring to an excel sheet name from a cell value, and so on. In this article, I’ll introduce you to three ways to use Excel sheet names from cell values with multiple examples.
Read More: How to Get Excel Sheet Name (2 Methods)
Download Practice Workbook
Three Ways to Use Excel Sheet Name From Cell Value
1. Using MID, CELL and FIND Function
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 name in cell B6.
Type the formula in cell B6,
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)
After pressing ENTER, Â you will get the Excel sheet name as the cell value.
If you change the Sheet Name your cell value will automatically change.
2.  Using INDIRECT Function
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.
Now type the formula in cell C6,
=INDIRECT(B6&"!D6")
After pressing Enter, you will get the value of cell D6 from the sheet named “Jhon”
In a similar way, you can get the value for the sheet named “Antony”
3.  Sheet Name from Cell Value With VBA
We can create an Excel sheet Name from any cell value by using Visual Basic Application (VBA). Consider the following dataset. Here we will name the Excel sheet as the name of the salesman in cell B6.
First, Right click on the sheet name from the sheet name tab  and select View Code.
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
Save the window and close it.
After that, the Excel sheet name will be changed to the cell value of B6.
Conclusion
I hope you are now capable of using Excel sheet names from cell values. If you have any confusion please leave a comment, so I’ll try my best to remove your confusion.
Further Readings
- How to Search Sheet Name in Excel Workbook (2 Methods)
- Apply Sheet Name Code in Footer in Excel (3 Ways)
- How to Search Sheet Name with VBA in Excel (3 Examples)
- Select Sheet by Variable Name with VBA in Excel (2 Ways)
- How to Use Sheet Name Code in Excel (4 Applications)
- List Sheet Name in Excel (5 Methods + VBA)
- How to Rename Sheet in Excel (6 Easy and Quick Methods)
- Rename Sheet with VBA in Excel (Both Single and Multiple Sheets)
how do you make the VBA code happen automatically, without clicking on the worksheet?