Saturday, 25 June 2016

How to list all worksheet names in Excel

1. Go to a sheet where you want to get the list of worksheet names in your workbook.


2. Right click on sheet-tab and select view code.

3. Paste below code and hit the run button.

Sub getsheetnames()

Dim i As Integer
For i = 1 To Worksheets.Count
Cells(i, 1).Value = Worksheets(i).Name
Next i
End Sub



The list will be created on sheet where you have selected a cell from.