ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Using a Cell Value to reference a Worksheet (https://www.excelbanter.com/excel-discussion-misc-queries/162407-using-cell-value-reference-worksheet.html)

pepperds

Using a Cell Value to reference a Worksheet
 
Hi,

I have 5 worksheets, labelled A-E.

Is it possible to build a formula which references the same cell in any one
of these worksheets by have A-E in cells A1, meaning that if I cahange the
value in A1 to either of the 5 letters, the result reflects the value in that
specific worksheet

cheers
pepperds


JW[_2_]

Using a Cell Value to reference a Worksheet
 
This will use the value in A1 to establish which sheet to get the
value from.
=INDIRECT("Sheet" & A1 & "!A2")

In effect, if A1 contains letter A, then this is saying =SheetA!A2.

pepperds wrote:
Hi,

I have 5 worksheets, labelled A-E.

Is it possible to build a formula which references the same cell in any one
of these worksheets by have A-E in cells A1, meaning that if I cahange the
value in A1 to either of the 5 letters, the result reflects the value in that
specific worksheet

cheers
pepperds



papou[_3_]

Using a Cell Value to reference a Worksheet
 
Hello pepperds
Use INDIRECT to build your reference eg:
=INDIRECT(A1 & "!A1")
Will return value from range A1 of specified sheet in A1

HTH
Cordially
Pascal


"pepperds" a écrit dans le message de
news: ...
Hi,

I have 5 worksheets, labelled A-E.

Is it possible to build a formula which references the same cell in any
one
of these worksheets by have A-E in cells A1, meaning that if I cahange the
value in A1 to either of the 5 letters, the result reflects the value in
that
specific worksheet

cheers
pepperds




Dave Peterson

Using a Cell Value to reference a Worksheet
 
I'd use:
=indirect("'" & a1 & "'!x99")
to return the value from X99 on the sheet named in A1.

The single quotes aren't always necessary--but won't hurt if they're there.



pepperds wrote:

Hi,

I have 5 worksheets, labelled A-E.

Is it possible to build a formula which references the same cell in any one
of these worksheets by have A-E in cells A1, meaning that if I cahange the
value in A1 to either of the 5 letters, the result reflects the value in that
specific worksheet

cheers
pepperds


--

Dave Peterson


All times are GMT +1. The time now is 08:44 PM.

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