ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Nesting a sheet name reference within a cell reference??? (https://www.excelbanter.com/excel-discussion-misc-queries/52792-nesting-sheet-name-reference-within-cell-reference.html)

Broyston

Nesting a sheet name reference within a cell reference???
 
I'm referencing a cell in another worksheet in my workbook, but I want to be
able to define which sheet is referenced in the formula by choosing the sheet
name from another cell. Let's say cell A1 in Sheet1 of the workbook has the
value "Sheet 2" and I want cell A2 in Sheet 1 to reference cell B15 in Sheet
2. Instead of my formula being ='Sheet 2'!B15, I would like the sheet name
to be a separate reference. In other words, I want the formula to be:
='[reference Sheet 1 cell A1 to get the tab name]'!B15.

This way I can create a list with a dropdown box, and change the sheet name
to bring up numbers from different, identically formatted, sheets.

Anyone know how to do this?

bj

Nesting a sheet name reference within a cell reference???
 
try
=indirect("'"&A1&"'!B15")

"Broyston" wrote:

I'm referencing a cell in another worksheet in my workbook, but I want to be
able to define which sheet is referenced in the formula by choosing the sheet
name from another cell. Let's say cell A1 in Sheet1 of the workbook has the
value "Sheet 2" and I want cell A2 in Sheet 1 to reference cell B15 in Sheet
2. Instead of my formula being ='Sheet 2'!B15, I would like the sheet name
to be a separate reference. In other words, I want the formula to be:
='[reference Sheet 1 cell A1 to get the tab name]'!B15.

This way I can create a list with a dropdown box, and change the sheet name
to bring up numbers from different, identically formatted, sheets.

Anyone know how to do this?


GregR

Nesting a sheet name reference within a cell reference???
 
Same questions, but get B15 to increment as it is filled down. TIA

Greg


Broyston

Nesting a sheet name reference within a cell reference???
 
Many thanks!
B

"bj" wrote:

try
=indirect("'"&A1&"'!B15")

"Broyston" wrote:

I'm referencing a cell in another worksheet in my workbook, but I want to be
able to define which sheet is referenced in the formula by choosing the sheet
name from another cell. Let's say cell A1 in Sheet1 of the workbook has the
value "Sheet 2" and I want cell A2 in Sheet 1 to reference cell B15 in Sheet
2. Instead of my formula being ='Sheet 2'!B15, I would like the sheet name
to be a separate reference. In other words, I want the formula to be:
='[reference Sheet 1 cell A1 to get the tab name]'!B15.

This way I can create a list with a dropdown box, and change the sheet name
to bring up numbers from different, identically formatted, sheets.

Anyone know how to do this?


RagDyer

Nesting a sheet name reference within a cell reference???
 
One way:

=INDIRECT("'"&$A$1&"'!B"&ROW(A15))

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"GregR" wrote in message
oups.com...
Same questions, but get B15 to increment as it is filled down. TIA

Greg



GregR

Nesting a sheet name reference within a cell reference???
 
RagDyer, thank you

Greg


Ragdyer

Nesting a sheet name reference within a cell reference???
 
Appreciate the feed-back.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"GregR" wrote in message
ups.com...
RagDyer, thank you

Greg



LeeKru

Nesting a sheet name reference within a cell reference???
 
This is the exact issue I am trying to resolve but the examples you provided
are only returning a #REF! result for me. What am I missing? I must admit I
don't understand the details of your example. I understand fundimentally
what "INDIRECT" is doing but I believe the first portion of your example is
properly returning the value of the cell on Sheet 1 that I am referencing (in
the example above, the formula seems to properly return "Sheet 2"). However,
it does not seem to understand the cell reference from 'Sheet 2' to return
the value I have in B15. For this example let's just say the value of 'Sheet
2'B15! is "Dog". Can you help? Thank you!!

"RagDyer" wrote:

One way:

=INDIRECT("'"&$A$1&"'!B"&ROW(A15))

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"GregR" wrote in message
oups.com...
Same questions, but get B15 to increment as it is filled down. TIA

Greg




LeeKru

Nesting a sheet name reference within a cell reference???
 
Please disregard my last note.... I had the wrong value in my reference
cell... rookie mistake. Thanks anyway.

"LeeKru" wrote:

This is the exact issue I am trying to resolve but the examples you provided
are only returning a #REF! result for me. What am I missing? I must admit I
don't understand the details of your example. I understand fundimentally
what "INDIRECT" is doing but I believe the first portion of your example is
properly returning the value of the cell on Sheet 1 that I am referencing (in
the example above, the formula seems to properly return "Sheet 2"). However,
it does not seem to understand the cell reference from 'Sheet 2' to return
the value I have in B15. For this example let's just say the value of 'Sheet
2'B15! is "Dog". Can you help? Thank you!!

"RagDyer" wrote:

One way:

=INDIRECT("'"&$A$1&"'!B"&ROW(A15))

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"GregR" wrote in message
oups.com...
Same questions, but get B15 to increment as it is filled down. TIA

Greg




InventablesPhil

Nesting a sheet name reference within a cell reference???
 
I have a simular problem that I can not resolve. I want to reference a cell
in another workbook. So if cell A1 contains the name of a worksheet in
another workbook. So I would like it reference ,,say cell B2 in "sheet2" of
another workbook.

e.g.

If Workbook 1/Sheet 1/Cell A1 contained "Sheet 2" and
Workbook 2/Sheet 2/Cell B2 contained "Find Me"

How can I from Workbook 2/Sheet 1 Cell C2 "find" the text "Find Me"?

I have tried =INDRECT("[Workbook 1.xls]'A1'!B2") and several other
variations without success.


All times are GMT +1. The time now is 07:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com