copyable list of worksheet names

arturo

New Member
Joined
Apr 25, 2002
Messages
1
I'd like to copy a list of the names of all the worksheets in a workbook. File Preferences shows a list of worksheet names but it's view-only text--I can't copy it. Is there a way to get a list I can copy?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
ASAP Utilities, a popular freeware add-in, has an "Information | List all sheet names" menu command. See www.asap-utilities.com. There's hardly a day that goes by that I don't use one of its features!
This message was edited by Mark W. on 2002-04-26 15:28
 
Upvote 0
I made use of a function to do this a while back. If you put the following in a standard module:

Code:
Function SHEETOFFSET(offset)
Application.Volatile
SHEETOFFSET = Sheets(Application.Caller.Parent.Index _
+ offset).Name
End Function

Now, on the first sheet, if your first sheet is going in row 1 then down, use the following formula:

=IF(ISERR(sheetoffset(ROW()-1)=TRUE),"",sheetoffset(ROW()-1))

and copy down

If it's in row 2:

=IF(ISERR(sheetoffset(ROW()-2)=TRUE),"",sheetoffset(ROW()-2))

and copy down

etc......It will show "" if there's no more sheets to show.

Incidentally, if you want to copy accross instead of down switch "row" with "column" in the worksheet formulas.

A different way to pluck a duck.

_________________
Cheers,<font size=+2><font color="red"> Nate<font color="blue">O</font></font></font>
This message was edited by NateO on 2002-04-26 15:57
 
Upvote 0
How about a quick VBA solution? Change the sheet referencing to suit.

Sub test()
Dim Counter As Integer, ws As Worksheet
Counter = 1

For Each ws In ThisWorkbook.Worksheets
Sheet1.Cells(Counter, 1) = ws.Name
Counter = Counter + 1
Next ws
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,046
Members
449,063
Latest member
ak94

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top