Quickly insert all sheet names in cells with VBA If you want to inset all sheet names in cells, VBA macro is a good choice Step 1 Hold down the Alt F11 keys in Excel, and it opens the Microsoft Visual Basic for Applications window Step 2 Click Insert > Module, and paste the following macro in the Module Window VBA for inserting all worksheets' names in cellsWe have a useful function in excel called as the CELL function which can be modified to return the sheet name, workbook name and the file path In this article we will learn how to return name of the excel sheet Lets see how this is done Considering that we want this info for the current file First lets understand the CELL Function TheHere, the name of each sheet is joined to the cell reference (A1) using concatenation =INDIRECT (B4&"!A1") Once concatenation is done, the result is =INDIRECT ("Sheet1!A1") The INDIRECT function will recognize the value in Cell A1 of Sheet1 and return the value The same applies when we use the dropdown feature for the other sheets
Get Worksheet Name From Formula Excel Automate Excel