Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / December 2005

Tip: Looking for answers? Try searching our database.

Using the Indirect function with a sheet number instead of a sheet name

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JDB - 30 Dec 2005 21:25 GMT
I use the Indirect function to summarize data from various worksheets;

If I have a worksheet named "Lucky", I can easily use the indirect
function.  My problem is that I will receive a workbook with a varying
number of worksheets that are named as shipping container numbers.
Each of these are unique and there is no order to them.

I would like to be able to use the indirect function by using the sheet
number instead of the sheet name but have had no success in doing so.

So the question is; "How can I use the sheet number in the Indirect
function to retrieve a value?"

Thanks

JDB
Peo Sjoblom - 30 Dec 2005 22:10 GMT
=INDIRECT("'12345'!A1")

or if the number is in cell
A10

=INDIRECT("'"&A10&"'!A1")

Signature

Regards,

Peo Sjoblom

(No private emails please)

>I use the Indirect function to summarize data from various worksheets;
>
[quoted text clipped - 12 lines]
>
> JDB
JDB - 31 Dec 2005 00:09 GMT
Thanks but that does not seem to answer my question.

As I understand it, each worksheet has 2 names;  a name and a codename.
If I look at the VBA explorer I can see 2 names for each worksheet
sheet1(Lucky).

Sheet1 is the Codename, and "Lucky" is the name.

I want to use the Codename in the function Indirect.

Thanks

JDB
Dave Peterson - 31 Dec 2005 02:03 GMT
That codename can be used for lots of things in code--but there's nothing you
could do with it in a worksheet (well, using stuff built into excel).

You'd have to write your own function to use it and if you did that, you
probably wouldn't need the =indirect() portion.

> Thanks but that does not seem to answer my question.
>
[quoted text clipped - 9 lines]
>
> JDB

Signature

Dave Peterson

Peo Sjoblom - 31 Dec 2005 02:48 GMT
Not possible using built in functions, Harlan Grove wrote a UDF

http://tinyurl.com/7cnaf

and if you scroll down a bit more there is a method using Excel 4 macro
however if copied it will crash some versions of Excel

Signature

Regards,

Peo Sjoblom

(No private emails please)

> Thanks but that does not seem to answer my question.
>
[quoted text clipped - 9 lines]
>
> JDB
JDB - 31 Dec 2005 15:03 GMT
Thanks to all

JDB
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.