Display current sheet name

To display the current/active sheet name in a cell in Excel we can use two different formulas or use VBA

Example: Display current sheet name

Display current sheet name

METHOD 1. Display current sheet name

EXCEL

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
This formula returns the name of the sheet where the formula is written.

METHOD 2. Display current sheet name

EXCEL

=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1)))
This formula returns the name of the sheet where the formula is written.

METHOD 1. Display current sheet name

VBA

Sub Display_current_sheet_name()
'display the name of the active sheet
ActiveSheet.Range("C4") = ActiveSheet.Name

End Sub

ADJUSTABLE PARAMETERS
Output Range: Select the output range by changing the cell reference ("C4") in the VBA code to any cell in the worksheet, that doesn't conflict with the formula.

Explanation about the formula used to display current sheet name

EXPLANATION

EXPLANATION
To display the current/active sheet name in a cell in Excel we can use two different formulas or use VBA.
FORMULAS
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1)))

ARGUMENTS
A1: A1 is the cell reference, to cell (A1), of the the sheet where the formula is written.