ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Help on index addressing using variable sheets & cell references (https://www.excelbanter.com/excel-worksheet-functions/155685-help-index-addressing-using-variable-sheets-cell-references.html)

Greggers

Help on index addressing using variable sheets & cell references
 
I wish to reference data in variable cells, on variable worksheets, from a
fixed worksheet :

Sheet 1.A1 = name of variable worksheets (Sheet 2, Sheet 3 ...) to get data
from
Sheet 1.A2 = variable row on chosen variable worksheet to get data from
The column on the variable worksheet will always be the same, say "B"
Data to be displayed in Sheet 1.A3

All the forum Q/As I have seen reference fixed cells on Sheet 2,3 etc, not
variable.
cells. I would also be interested to know the formula if the row was fixed
and the column was variable.

Can anyone help ?

junior52

Help on index addressing using variable sheets & cell references
 
Hi

try this =INDIRECT(A1&"!B"&A2)

"Greggers" wrote:

I wish to reference data in variable cells, on variable worksheets, from a
fixed worksheet :

Sheet 1.A1 = name of variable worksheets (Sheet 2, Sheet 3 ...) to get data
from
Sheet 1.A2 = variable row on chosen variable worksheet to get data from
The column on the variable worksheet will always be the same, say "B"
Data to be displayed in Sheet 1.A3

All the forum Q/As I have seen reference fixed cells on Sheet 2,3 etc, not
variable.
cells. I would also be interested to know the formula if the row was fixed
and the column was variable.

Can anyone help ?


Harlan Grove[_2_]

Help on index addressing using variable sheets & cell references
 
"junior52" wrote...
try this =INDIRECT(A1&"!B"&A2)

....

Much more robust to enclose the worksheet name in single quotes.

=INDIRECT("'"&A1&"'!B"&A2)



Greggers

Help on index addressing using variable sheets & cell referenc
 
The 'more robust' approach of using single quotes worked, as the worksheet
names have a space in them.

Many thanks


All times are GMT +1. The time now is 04:36 PM.

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