Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Using cell content as reference in formula

I have a simple formula which reads:

='P1'!$L$52

Where 'P1' is a worksheet name.

I want the value 'P1' to be the contents of another cell.

Reason being:

This worksheet is a summary worksheet. Each row contains multiple values
(or formulas) from a different worksheet. I'd like to have one column where I
type the worksheet name and have that name automatically inserted into the
formulas throughout the row.

I apologize if this has been asked a hundred times before, I just don't know
a good search string to enter!

Thanks for your help.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Using cell content as reference in formula

I'm not sure which cell contains the worksheet name - assume it is P1,
and then use this formula:

=INDIRECT("'"&P1&"'!$L$52")

Copy this down, and it will take the sheet name from P1, then P2, P3
etc. I've assumed that the worksheets are all in the same workbook.

Hope this helps.

Pete

On Feb 4, 1:53*pm, ptrip wrote:
I have a simple formula which reads:

='P1'!$L$52

Where 'P1' is a worksheet name.

I want the value 'P1' to be the contents of another cell.

Reason being:

This worksheet is a summary worksheet. *Each row contains multiple values
(or formulas) from a different worksheet. I'd like to have one column where I
type the worksheet name and have that name automatically inserted into the
formulas throughout the row.

I apologize if this has been asked a hundred times before, I just don't know
a good search string to enter!

Thanks for your help.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Using cell content as reference in formula

If the sheet name is in A1 then:
=INDIRECT(A1 & "!" & "$L$52")

--
Gary''s Student - gsnu200767
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 791
Default Using cell content as reference in formula

Use the ampersand to concatenate the values for Example
If you have selected column "C" to hold the worksheet name, and you still
want to show the value of 'P1'!$L$52 you would something like this:

='P1'!$L$52&$C1 and so on....

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"ptrip" wrote:

I have a simple formula which reads:

='P1'!$L$52

Where 'P1' is a worksheet name.

I want the value 'P1' to be the contents of another cell.

Reason being:

This worksheet is a summary worksheet. Each row contains multiple values
(or formulas) from a different worksheet. I'd like to have one column where I
type the worksheet name and have that name automatically inserted into the
formulas throughout the row.

I apologize if this has been asked a hundred times before, I just don't know
a good search string to enter!

Thanks for your help.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Using cell content as reference in formula

=INDIRECT("'"&A1&"'!$L$52")
that is
( double-quote single-quote &A1 double-quote single-quote !$L$52
double-quote )

With the text P1 in cell A1
best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"ptrip" wrote in message
...
I have a simple formula which reads:

='P1'!$L$52

Where 'P1' is a worksheet name.

I want the value 'P1' to be the contents of another cell.

Reason being:

This worksheet is a summary worksheet. Each row contains multiple values
(or formulas) from a different worksheet. I'd like to have one column
where I
type the worksheet name and have that name automatically inserted into the
formulas throughout the row.

I apologize if this has been asked a hundred times before, I just don't
know
a good search string to enter!

Thanks for your help.





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Using cell content as reference in formula

Thank you, thank you, thank you!!

(Obviously, it worked)

"Gary''s Student" wrote:

If the sheet name is in A1 then:
=INDIRECT(A1 & "!" & "$L$52")

--
Gary''s Student - gsnu200767

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Using cell content as reference in formula

You have managed to answer a question I didn't yet have ... thanks!

"Michael" wrote:

Use the ampersand to concatenate the values for Example
If you have selected column "C" to hold the worksheet name, and you still
want to show the value of 'P1'!$L$52 you would something like this:

='P1'!$L$52&$C1 and so on....

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"ptrip" wrote:

I have a simple formula which reads:

='P1'!$L$52

Where 'P1' is a worksheet name.

I want the value 'P1' to be the contents of another cell.

Reason being:

This worksheet is a summary worksheet. Each row contains multiple values
(or formulas) from a different worksheet. I'd like to have one column where I
type the worksheet name and have that name automatically inserted into the
formulas throughout the row.

I apologize if this has been asked a hundred times before, I just don't know
a good search string to enter!

Thanks for your help.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Using cell content as reference in formula

The sheet names aren't necessarily in any sort of order, those I will hand
enter. I just wanted the cell I entered the names into to be referenced by
other formulas within that row (I know, confusing).

"Gary's Student" solution answered by question ... but thanks so much for
your time!

"Pete_UK" wrote:

I'm not sure which cell contains the worksheet name - assume it is P1,
and then use this formula:

=INDIRECT("'"&P1&"'!$L$52")

Copy this down, and it will take the sheet name from P1, then P2, P3
etc. I've assumed that the worksheets are all in the same workbook.

Hope this helps.

Pete

On Feb 4, 1:53 pm, ptrip wrote:
I have a simple formula which reads:

='P1'!$L$52

Where 'P1' is a worksheet name.

I want the value 'P1' to be the contents of another cell.

Reason being:

This worksheet is a summary worksheet. Each row contains multiple values
(or formulas) from a different worksheet. I'd like to have one column where I
type the worksheet name and have that name automatically inserted into the
formulas throughout the row.

I apologize if this has been asked a hundred times before, I just don't know
a good search string to enter!

Thanks for your help.



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Using cell content as reference in formula

This gave me errors, unfortuantely. Gary's student had a formula that worked.

I appreciate your time though!

"Bernard Liengme" wrote:

=INDIRECT("'"&A1&"'!$L$52")
that is
( double-quote single-quote &A1 double-quote single-quote !$L$52
double-quote )

With the text P1 in cell A1
best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"ptrip" wrote in message
...
I have a simple formula which reads:

='P1'!$L$52

Where 'P1' is a worksheet name.

I want the value 'P1' to be the contents of another cell.

Reason being:

This worksheet is a summary worksheet. Each row contains multiple values
(or formulas) from a different worksheet. I'd like to have one column
where I
type the worksheet name and have that name automatically inserted into the
formulas throughout the row.

I apologize if this has been asked a hundred times before, I just don't
know
a good search string to enter!

Thanks for your help.




  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Using cell content as reference in formula

Suggest a slight refinement to Gary's:
=INDIRECT(A1 & "!" & "$L$52")


ie use it like this:
=INDIRECT("'"& A1 & "'!L52")

The concat of the single apostrophes before and after the sheetname will
make it work even if the sheetname were to contain spaces, eg: P 1, instead
of P1.

The other simplification is a minor one where we can drop the $ signs for
the L52 and just meld it with the ! since the cell ref here is just a
textstring, it won't change.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---



  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Using cell content as reference in formula

Thanks! Most, but not necessarily all, of my panels have no spaces. But I'm
sure this alteration will save a couple of hairs in the future!

"Max" wrote:

Suggest a slight refinement to Gary's:
=INDIRECT(A1 & "!" & "$L$52")


ie use it like this:
=INDIRECT("'"& A1 & "'!L52")

The concat of the single apostrophes before and after the sheetname will
make it work even if the sheetname were to contain spaces, eg: P 1, instead
of P1.

The other simplification is a minor one where we can drop the $ signs for
the L52 and just meld it with the ! since the cell ref here is just a
textstring, it won't change.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Using cell content as reference in formula

Not confusing to me - the formula would work if you put your sheet
name in P1, and they can be in any order. If you use A1 to enter your
sheet name, then change it to:

=INDIRECT("'"&A1&"'!$L$52")

which is what you have been given elsewhere.

Pete

On Feb 4, 3:08*pm, ptrip wrote:
The sheet names aren't necessarily in any sort of order, those I will hand
enter. *I just wanted the cell I entered the names into to be referenced by
other formulas within that row (I know, confusing).

"Gary's Student" solution answered by question ... but thanks so much for
your time!



"Pete_UK" wrote:
I'm not sure which cell contains the worksheet name - assume it is P1,
and then use this formula:


=INDIRECT("'"&P1&"'!$L$52")


Copy this down, and it will take the sheet name from P1, then P2, P3
etc. I've assumed that the worksheets are all in the same workbook.


Hope this helps.


Pete


On Feb 4, 1:53 pm, ptrip wrote:
I have a simple formula which reads:


='P1'!$L$52


Where 'P1' is a worksheet name.


I want the value 'P1' to be the contents of another cell.


Reason being:


This worksheet is a summary worksheet. *Each row contains multiple values
(or formulas) from a different worksheet. I'd like to have one column where I
type the worksheet name and have that name automatically inserted into the
formulas throughout the row.


I apologize if this has been asked a hundred times before, I just don't know
a good search string to enter!


Thanks for your help.- Hide quoted text -


- Show quoted text -


  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Using cell content as reference in formula

Ah-ha ... now I see!

"Pete_UK" wrote:

Not confusing to me - the formula would work if you put your sheet
name in P1, and they can be in any order. If you use A1 to enter your
sheet name, then change it to:

=INDIRECT("'"&A1&"'!$L$52")

which is what you have been given elsewhere.

Pete

On Feb 4, 3:08 pm, ptrip wrote:
The sheet names aren't necessarily in any sort of order, those I will hand
enter. I just wanted the cell I entered the names into to be referenced by
other formulas within that row (I know, confusing).

"Gary's Student" solution answered by question ... but thanks so much for
your time!



"Pete_UK" wrote:
I'm not sure which cell contains the worksheet name - assume it is P1,
and then use this formula:


=INDIRECT("'"&P1&"'!$L$52")


Copy this down, and it will take the sheet name from P1, then P2, P3
etc. I've assumed that the worksheets are all in the same workbook.


Hope this helps.


Pete


On Feb 4, 1:53 pm, ptrip wrote:
I have a simple formula which reads:


='P1'!$L$52


Where 'P1' is a worksheet name.


I want the value 'P1' to be the contents of another cell.


Reason being:


This worksheet is a summary worksheet. Each row contains multiple values
(or formulas) from a different worksheet. I'd like to have one column where I
type the worksheet name and have that name automatically inserted into the
formulas throughout the row.


I apologize if this has been asked a hundred times before, I just don't know
a good search string to enter!


Thanks for your help.- Hide quoted text -


- Show quoted text -



  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Using cell content as reference in formula

Good !!

Pete

On Feb 4, 4:05*pm, ptrip wrote:
Ah-ha ... now I see!

  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Using cell content as reference in formula

"ptrip" wrote:
Thanks! Most, but not necessarily all, of my panels have no spaces. But I'm
sure this alteration will save a couple of hairs in the future!


Welcome. I'd use the suggested version:
=INDIRECT("'"& A1 & "'!L52")

all of the time, to pre-empt all possibilities in the sheetnames
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
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
Cell Content Cross Reference ron kahn Excel Worksheet Functions 1 March 2nd 07 11:43 AM
Reference cell formats + content 0-0 Wai Wai ^-^ Excel Discussion (Misc queries) 4 December 24th 05 02:46 AM
Reference Cell Content Sloth Excel Worksheet Functions 1 November 17th 05 09:00 PM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 1 February 11th 05 06:36 AM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 0 February 11th 05 05:35 AM


All times are GMT +1. The time now is 02:23 PM.

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"