PC Review


Reply
Thread Tools Rate Thread

List of worksheets

 
 
Igor
Guest
Posts: n/a
 
      9th Jul 2008
Hello

I'm wondering if it's possible to make a list of all worksheets using Excel
functions only. Assuming the first worksheet is "TheList" I want to make, in
that workbook, a list of all worksheets right from that worksheet using
functions only?
Is it possible?

Thanks for any help.

 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      9th Jul 2008
None that I know using Excel functions only.

Usually VBA macro is employed to get a list of sheets.

Private Sub ListSheets()
Dim rng As Range
Dim I As Integer
Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = "TheList"
Set rng = Range("A1")
For Each Sheet In ActiveWorkbook.Sheets
rng.Offset(I, 0).Value = Sheet.Name
I = I + 1
Next Sheet
End Sub


Gord Dibben MS Excel MVP

On Wed, 9 Jul 2008 17:49:17 +0200, "Igor" <(E-Mail Removed)> wrote:

>Hello
>
>I'm wondering if it's possible to make a list of all worksheets using Excel
>functions only. Assuming the first worksheet is "TheList" I want to make, in
>that workbook, a list of all worksheets right from that worksheet using
>functions only?
>Is it possible?
>
>Thanks for any help.


 
Reply With Quote
 
Héctor Miguel
Guest
Posts: n/a
 
      9th Jul 2008
hi, Igor !

> I'm wondering if it's possible to make a list of all worksheets using Excel functions only.
> Assuming the first worksheet is "TheList" I want to make, in that workbook
> a list of all worksheets right from that worksheet using functions only?
> Is it possible?


1) be sure "TheList" sheet is the first (index) in the workbook

2) put a title in A1 (i.e. Sheets in this workbook)

3) define/create a name (menu: insert / names / define...)
name: n_Sheets
formula: =get.workbook(1+0*now())

4) get the list with the following formula:
[A2] =choose(1+(row()>counta(n_sheets)),mid(index(n_sheets,row()),search("]",index(n_sheets,1))+1,31),"")

5) copy/drag/... A2-formula n_rows down (as needed)

hth,
hector.


 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      10th Jul 2008
Cool!


Gord

On Wed, 9 Jul 2008 14:10:07 -0500, "Héctor Miguel"
<(E-Mail Removed)> wrote:

>hi, Igor !
>
>> I'm wondering if it's possible to make a list of all worksheets using Excel functions only.
>> Assuming the first worksheet is "TheList" I want to make, in that workbook
>> a list of all worksheets right from that worksheet using functions only?
>> Is it possible?

>
>1) be sure "TheList" sheet is the first (index) in the workbook
>
>2) put a title in A1 (i.e. Sheets in this workbook)
>
>3) define/create a name (menu: insert / names / define...)
> name: n_Sheets
> formula: =get.workbook(1+0*now())
>
>4) get the list with the following formula:
> [A2] =choose(1+(row()>counta(n_sheets)),mid(index(n_sheets,row()),search("]",index(n_sheets,1))+1,31),"")
>
>5) copy/drag/... A2-formula n_rows down (as needed)
>
>hth,
>hector.
>


 
Reply With Quote
 
Don
Guest
Posts: n/a
 
      10th Jul 2008
Héctor,

Your formulas work great to return the names of all of the sheets to the
right of the first sheet. However, can your formula below be modified to
return the contents of cell A1 on all sheets to the right of the first sheet?

"Héctor Miguel" wrote:

> hi, Igor !
>
> > I'm wondering if it's possible to make a list of all worksheets using Excel functions only.
> > Assuming the first worksheet is "TheList" I want to make, in that workbook
> > a list of all worksheets right from that worksheet using functions only?
> > Is it possible?

>
> 1) be sure "TheList" sheet is the first (index) in the workbook
>
> 2) put a title in A1 (i.e. Sheets in this workbook)
>
> 3) define/create a name (menu: insert / names / define...)
> name: n_Sheets
> formula: =get.workbook(1+0*now())
>
> 4) get the list with the following formula:
> [A2] =choose(1+(row()>counta(n_sheets)),mid(index(n_sheets,row()),search("]",index(n_sheets,1))+1,31),"")
>
> 5) copy/drag/... A2-formula n_rows down (as needed)
>
> hth,
> hector.
>
>
>

 
Reply With Quote
 
Héctor Miguel
Guest
Posts: n/a
 
      11th Jul 2008
hi, Don !

> Your formulas work great to return the names of all of the sheets to the right of the first sheet.
> However, can your formula below be modified to return the contents of cell A1 on all sheets to the right of the first sheet?


you can use "the list" of worksheets giving another name to that range
(excluding title and blanks or whatever used)
nesting indirect function within sumproduct(sumif(..."!a1"...

there are a lot of examples on the web (i.e. -> http://tinyurl.com/6rzdc6)

hth,
hector.

__ OP __
>>> I'm wondering if it's possible to make a list of all worksheets using Excel functions only.
>>> Assuming the first worksheet is "TheList" I want to make, in that workbook
>>> a list of all worksheets right from that worksheet using functions only?
>>> Is it possible?

>>
>> 1) be sure "TheList" sheet is the first (index) in the workbook
>>
>> 2) put a title in A1 (i.e. Sheets in this workbook)
>>
>> 3) define/create a name (menu: insert / names / define...)
>> name: n_Sheets
>> formula: =get.workbook(1+0*now())
>>
>> 4) get the list with the following formula:
>> [A2] =choose(1+(row()>counta(n_sheets)),mid(index(n_sheets,row()),search("]",index(n_sheets,1))+1,31),"")
>>
>> 5) copy/drag/... A2-formula n_rows down (as needed)



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
List of worksheets wally Microsoft Excel New Users 9 31st Aug 2008 08:01 PM
Get a list of worksheets from a WB John Scott Microsoft Excel Misc 1 26th Feb 2006 06:47 PM
Get a List of Worksheets glonka Microsoft Excel Programming 6 10th Aug 2004 11:52 PM
VBA list all worksheets glonka Microsoft Excel Programming 2 10th Aug 2004 06:31 PM
List of worksheets C Tate Microsoft Excel Discussion 5 17th Jul 2003 07:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:18 PM.