Get names of all worksheets in one worksheet without VBScript

SeraphicSoul

New Member
Joined
Jun 18, 2012
Messages
9
Hello all,

Haven't been able to search for something like this so I'm hoping you could help me out!

Basically I want to be able to get the names of all sheets in a workbook. I know how to get Excel to print the name of the sheet in a cell once the file is saved, and I know how to hide sheets to make sure that all sheets are referenced in a range. If the name of the worksheet is in the same cell across all sheets (except the ones I don't want included on the totals page), is there a way to call that range and have Excel print off all the worksheet names in different rows or columns via a fill function?

Difficulties: the user may add/delete, rename, and have any number of, worksheets in the workbook. Because these variables are unpredictable, I am having difficulty figuring out the way to do this. Also, the formula should be able to ignore the sheets which have no value in the expected cell.

And, of course, as thread title suggests, I am unable to use vbscript/macros in this sheet. Any ideas?
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

SeraphicSoul

New Member
Joined
Jun 18, 2012
Messages
9
Bump! I've been researching into string functions but it seems CONCATENATE cannot take a range as an argument, and even if I got that to work I'd still have to split the resultant string somehow. I've seen tips for getting Excel to auto-create it on a single sheet but not when the range is across many sheets. VLOOKUP with a simple range across all sheets doesn't seem to work either, because I cannot make each sheet auto-generate a unique value when created, and it will only grab the first value in a range of identical values.

Thoughts?
 
Upvote 0

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
21,651
Office Version
  1. 365
  2. 2019
  3. 2013
  4. 2007
Platform
  1. Windows
Try this, kindly provided by Richard Schollar
You will have to adjust for cell location

1. Create a new defined name caled shts and define it:

=GET.WORKBOOK(1)

and click Add

2. In a worksheet in cell A1 enter the following formula and copy down:

=INDEX(shts,ROWS($A$1:$A1))

This will give you the workbook name too (as wel as the sheet) - if you want just the sheets use:

Sheet2
 
Upvote 0

SeraphicSoul

New Member
Joined
Jun 18, 2012
Messages
9
You, sir, are a scholar and a gentleman. Thank you kindly for this tip! Works like a charm. Combined with a little error catcher and a MID function, it's exactly what I'm looking for. All my google searching couldn't come up with this, so I thank you very much for this!
 
Upvote 0

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
21,651
Office Version
  1. 365
  2. 2019
  3. 2013
  4. 2007
Platform
  1. Windows
Glad it worked, but Richard is both the Schollar, (pun intended) and a gentleman !!....(y)
 
Upvote 0

Forum statistics

Threads
1,195,681
Messages
6,011,129
Members
441,586
Latest member
rodsin76

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
Top