Sunday, 1 September 2013

How to list all tab names in excel

How to list all tab names in excel

We may have multiple tabs in Excel and their names can be listed easily by running a macro, instead of copying and pasting the sheet names one by one.
1.      Open a New excel
2.      Press ALT+F11 , it will open a Visual basic Screen.
3.      Click Insert→ Module, Editor will open.
4.      Copy the below macro,
Sub a()
For i = 1 To ActiveWorkbook.Worksheets.Count
Cells(i, 1) = ActiveWorkbook.Worksheets(i).Name
Next i
End Sub

      5.   Click Run on the menu bar and then Run sub\UserForm or F5.
6.      A pop up screen will show and then click Run button. 

No comments:

Post a Comment

Creative Commons Licence
BLOG by Suresh is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at
Permissions beyond the scope of this license may be available at