ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Listing the names of your worksheets (https://www.excelbanter.com/excel-discussion-misc-queries/91324-listing-names-your-worksheets.html)

gunslinger

Listing the names of your worksheets
 
I've searched but haven't come up with an exact answer on this,
I want to use one empty worksheet to display a list of all of the worksheets
in the workbook. I will then be using the names in order to get data from
each sheet. I started doing it manually, just typing in the name of the
sheet, but there are way too many sheets and I've only made a dent so far.

Are there any formulas?
Macros?
Scripts?

I'd rather get a formula first, even if it's long and drawn out, and then a
macro. Last thing I'd try is the script.

Thanks in advance.

Bob Phillips

Listing the names of your worksheets
 
Macro.

SubSheetNames
Dim i As Long

For i = 1 To Activeworkbook.Worksheets.Count
Cells(i,"A").Value = Worksheets(i).Name
Next i
End Sub

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"gunslinger" wrote in message
...
I've searched but haven't come up with an exact answer on this,
I want to use one empty worksheet to display a list of all of the

worksheets
in the workbook. I will then be using the names in order to get data from
each sheet. I started doing it manually, just typing in the name of the
sheet, but there are way too many sheets and I've only made a dent so far.

Are there any formulas?
Macros?
Scripts?

I'd rather get a formula first, even if it's long and drawn out, and then

a
macro. Last thing I'd try is the script.

Thanks in advance.




SiC

Listing the names of your worksheets
 
Hi gunslinger,

I don't see a formula for what you're asking for, but you can try a simple
macro:

Sub SheetNames()

Dim i As Integer

For i = 1 To Sheets.Count
Sheets(Sheets.Count).Cells(i, 1).Value = Sheets(i).Name
Next i

End Sub

This will list all the names of the sheets starting from cell A1 of the last
sheet. Hope this helps.

-Simon

"gunslinger" wrote:

I've searched but haven't come up with an exact answer on this,
I want to use one empty worksheet to display a list of all of the worksheets
in the workbook. I will then be using the names in order to get data from
each sheet. I started doing it manually, just typing in the name of the
sheet, but there are way too many sheets and I've only made a dent so far.

Are there any formulas?
Macros?
Scripts?

I'd rather get a formula first, even if it's long and drawn out, and then a
macro. Last thing I'd try is the script.

Thanks in advance.


Daniel CHEN

Listing the names of your worksheets
 
This utility program can do want you want
http://www.xldatasoft.com/downloads/SortSheet.xls
It first lists all the sheets' name in a new blank sheet - this is what you
want.
Then it sort the sheets - this is extra.

--
Best regards,
---
Yongjun CHEN

"gunslinger" wrote in message
...
I've searched but haven't come up with an exact answer on this,
I want to use one empty worksheet to display a list of all of the
worksheets
in the workbook. I will then be using the names in order to get data from
each sheet. I started doing it manually, just typing in the name of the
sheet, but there are way too many sheets and I've only made a dent so far.

Are there any formulas?
Macros?
Scripts?

I'd rather get a formula first, even if it's long and drawn out, and then
a
macro. Last thing I'd try is the script.

Thanks in advance.





All times are GMT +1. The time now is 03:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com