Excel (VBA) create list of all worksheet names in workbook


/ Published in: Visual Basic
Save to your folder(s)

This inserts a new column in the active worksheet and lists all the worksheet names, using a row for each name. Useful if you have lots of worksheets names that you want to reference accurately.


Copy this code and paste it in your HTML
  1. Sub SheetNames()
  2. Columns(1).Insert
  3. For i = 1 To Sheets.Count
  4. Cells(i, 1) = Sheets(i).Name
  5. Next i
  6. End Sub

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.