Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default Refering cell to the worksheet name

I am trying to create an excel file with 100 worksheets in it. These 100
worksheets will be having the prices of individual stocks in different years.
After the whole thing I have made one main worksheet that has the final
output from the 100 worksheets but this time only for fixed years, i.e 2001.
Here is how I am doing :

A B C
Name Year Price
MSFT 2001 30 (=msft!$AA$26)
APPLE 2001 35 (=Apple!$AA$26)

This works fine cause I have named the worksheets by the name of the stock.

But when I input (=A3!$AA$26) instead of (=msft!$AA$26) , it gives me an
error. Since I have 100 stocks it is very time consuming to keep on replacing
the name i.e MSFT and Apple and so on.

If I can refer it directly with the column it would be much more easier for
me.
P.S The name in the 1st column is the same as the name of the worksheets.

any help.. would be much appreciated...



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Refering cell to the worksheet name

Hi,

This formula will pick up the value from cell B2 of the sheet named MSFT.
This formula assumed that A1 carries MSFT. You can now copy this down

INDIRECT(A1&"!"&"B2")

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Dave" wrote in message
...
I am trying to create an excel file with 100 worksheets in it. These 100
worksheets will be having the prices of individual stocks in different
years.
After the whole thing I have made one main worksheet that has the final
output from the 100 worksheets but this time only for fixed years, i.e
2001.
Here is how I am doing :

A B C
Name Year Price
MSFT 2001 30 (=msft!$AA$26)
APPLE 2001 35 (=Apple!$AA$26)

This works fine cause I have named the worksheets by the name of the
stock.

But when I input (=A3!$AA$26) instead of (=msft!$AA$26) , it gives me an
error. Since I have 100 stocks it is very time consuming to keep on
replacing
the name i.e MSFT and Apple and so on.

If I can refer it directly with the column it would be much more easier
for
me.
P.S The name in the 1st column is the same as the name of the worksheets.

any help.. would be much appreciated...



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Refering cell to the worksheet name

Try this with a valid worksheet name in A1

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

Mike

"Dave" wrote:

I am trying to create an excel file with 100 worksheets in it. These 100
worksheets will be having the prices of individual stocks in different years.
After the whole thing I have made one main worksheet that has the final
output from the 100 worksheets but this time only for fixed years, i.e 2001.
Here is how I am doing :

A B C
Name Year Price
MSFT 2001 30 (=msft!$AA$26)
APPLE 2001 35 (=Apple!$AA$26)

This works fine cause I have named the worksheets by the name of the stock.

But when I input (=A3!$AA$26) instead of (=msft!$AA$26) , it gives me an
error. Since I have 100 stocks it is very time consuming to keep on replacing
the name i.e MSFT and Apple and so on.

If I can refer it directly with the column it would be much more easier for
me.
P.S The name in the 1st column is the same as the name of the worksheets.

any help.. would be much appreciated...



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default Refering cell to the worksheet name

Thank you for the reply

But when I am putting the Details it says that it has an error. It is not
able to get the result.

A B C
1 Name Year Price
2 MSFT 2001 30
3 APPLE 2001 35


The first line is exactly the same as shown above and the price is in the
worksheet with the name MSFT in the cell AA26

I entered :
=INDIRECT("" & A2 & ""!AA26")

this is giving me an error. looking forward to your reply




"Mike H" wrote:

Try this with a valid worksheet name in A1

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

Mike

"Dave" wrote:

I am trying to create an excel file with 100 worksheets in it. These 100
worksheets will be having the prices of individual stocks in different years.
After the whole thing I have made one main worksheet that has the final
output from the 100 worksheets but this time only for fixed years, i.e 2001.
Here is how I am doing :

A B C
Name Year Price
MSFT 2001 30 (=msft!$AA$26)
APPLE 2001 35 (=Apple!$AA$26)

This works fine cause I have named the worksheets by the name of the stock.

But when I input (=A3!$AA$26) instead of (=msft!$AA$26) , it gives me an
error. Since I have 100 stocks it is very time consuming to keep on replacing
the name i.e MSFT and Apple and so on.

If I can refer it directly with the column it would be much more easier for
me.
P.S The name in the 1st column is the same as the name of the worksheets.

any help.. would be much appreciated...



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Refering cell to the worksheet name

It gave you an error because you copied the formula incorrectly. It's
difficult to see bur if you zoom you will see it contain " and ' characters

Copy and paste the formula and it will work.

Mike

"Dave" wrote:

Thank you for the reply

But when I am putting the Details it says that it has an error. It is not
able to get the result.

A B C
1 Name Year Price
2 MSFT 2001 30
3 APPLE 2001 35


The first line is exactly the same as shown above and the price is in the
worksheet with the name MSFT in the cell AA26

I entered :
=INDIRECT("" & A2 & ""!AA26")

this is giving me an error. looking forward to your reply




"Mike H" wrote:

Try this with a valid worksheet name in A1

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

Mike

"Dave" wrote:

I am trying to create an excel file with 100 worksheets in it. These 100
worksheets will be having the prices of individual stocks in different years.
After the whole thing I have made one main worksheet that has the final
output from the 100 worksheets but this time only for fixed years, i.e 2001.
Here is how I am doing :

A B C
Name Year Price
MSFT 2001 30 (=msft!$AA$26)
APPLE 2001 35 (=Apple!$AA$26)

This works fine cause I have named the worksheets by the name of the stock.

But when I input (=A3!$AA$26) instead of (=msft!$AA$26) , it gives me an
error. Since I have 100 stocks it is very time consuming to keep on replacing
the name i.e MSFT and Apple and so on.

If I can refer it directly with the column it would be much more easier for
me.
P.S The name in the 1st column is the same as the name of the worksheets.

any help.. would be much appreciated...





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Refering cell to the worksheet name

Hi Dave

try
=INDIRECT(""&A3&"'!AA26")

--
Regards
Roger Govier

"Dave" wrote in message
...
I am trying to create an excel file with 100 worksheets in it. These 100
worksheets will be having the prices of individual stocks in different
years.
After the whole thing I have made one main worksheet that has the final
output from the 100 worksheets but this time only for fixed years, i.e
2001.
Here is how I am doing :

A B C
Name Year Price
MSFT 2001 30 (=msft!$AA$26)
APPLE 2001 35 (=Apple!$AA$26)

This works fine cause I have named the worksheets by the name of the
stock.

But when I input (=A3!$AA$26) instead of (=msft!$AA$26) , it gives me an
error. Since I have 100 stocks it is very time consuming to keep on
replacing
the name i.e MSFT and Apple and so on.

If I can refer it directly with the column it would be much more easier
for
me.
P.S The name in the 1st column is the same as the name of the worksheets.

any help.. would be much appreciated...



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Refering cell to the worksheet name

Hi,

If you are still having problems with this try slightly shorter version:

=INDIRECT(A3&"!AA26")

--
Thanks,
Shane Devenshire


"Dave" wrote:

I am trying to create an excel file with 100 worksheets in it. These 100
worksheets will be having the prices of individual stocks in different years.
After the whole thing I have made one main worksheet that has the final
output from the 100 worksheets but this time only for fixed years, i.e 2001.
Here is how I am doing :

A B C
Name Year Price
MSFT 2001 30 (=msft!$AA$26)
APPLE 2001 35 (=Apple!$AA$26)

This works fine cause I have named the worksheets by the name of the stock.

But when I input (=A3!$AA$26) instead of (=msft!$AA$26) , it gives me an
error. Since I have 100 stocks it is very time consuming to keep on replacing
the name i.e MSFT and Apple and so on.

If I can refer it directly with the column it would be much more easier for
me.
P.S The name in the 1st column is the same as the name of the worksheets.

any help.. would be much appreciated...



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Refering to a sheet in a cell Jarek Kujawa[_2_] Excel Discussion (Misc queries) 0 July 31st 08 11:06 AM
Refering to a sheet in a cell Jarek Kujawa[_2_] Excel Discussion (Misc queries) 0 July 31st 08 10:02 AM
Can you name a worksheet by refering to a cell reference or range o2bing Excel Discussion (Misc queries) 10 March 21st 08 07:18 AM
Refering a cell Arun Kumar Saha Excel Worksheet Functions 2 June 18th 07 12:48 PM
Refering to a tab using data from a cell dan Excel Worksheet Functions 5 May 13th 05 01:24 PM


All times are GMT +1. The time now is 11:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"