Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Using data in cell for sheet referencing in formulas

I have a multi sheet spreadhseet in which the Sheet reference (from which i
require data) is held as cell data.

For example in Sheet 2 i have a reference in a cell A3 which contains the
data "Sheet 1". in attempting to dynamically access this sheet in a formula i
am trying to use A3 instead of the standard Sheet 1 that is automatically
used.

i.e. I am trying to replace formula is Sheet 2 from =SUM(Sheet1!H1:H9) to
dynamically reference Sheet 1, something along the lines of =SUM(A3!H1:H9).

However using the dynamic cell reference A3 - it does not work!! Any ideas
on how to resolve this. I have tried absolute referencing, using single and
double quotes, but unable to achieve the desired result. Any assistance most
welcome!!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Using data in cell for sheet referencing in formulas

Use the Indirect() function:

=SUM(INDIRECT(A3&"!H1:H9"))

HOWEVER, if your sheet names have spaces in them,
Or even if they presently *don't*,
it's safer to include the single quotes for safety,
which will work with names that do and/or don't have them:

=SUM(INDIRECT("'"&A3&"'!H1:H9"))

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"MS_user" wrote in message
...
I have a multi sheet spreadhseet in which the Sheet reference (from which i
require data) is held as cell data.

For example in Sheet 2 i have a reference in a cell A3 which contains the
data "Sheet 1". in attempting to dynamically access this sheet in a
formula i
am trying to use A3 instead of the standard Sheet 1 that is automatically
used.

i.e. I am trying to replace formula is Sheet 2 from =SUM(Sheet1!H1:H9) to
dynamically reference Sheet 1, something along the lines of
=SUM(A3!H1:H9).

However using the dynamic cell reference A3 - it does not work!! Any ideas
on how to resolve this. I have tried absolute referencing, using single
and
double quotes, but unable to achieve the desired result. Any assistance
most
welcome!!



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 396
Default Using data in cell for sheet referencing in formulas

You need to use the INDIRECT function.


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"MS_user" wrote:

I have a multi sheet spreadhseet in which the Sheet reference (from which i
require data) is held as cell data.

For example in Sheet 2 i have a reference in a cell A3 which contains the
data "Sheet 1". in attempting to dynamically access this sheet in a formula i
am trying to use A3 instead of the standard Sheet 1 that is automatically
used.

i.e. I am trying to replace formula is Sheet 2 from =SUM(Sheet1!H1:H9) to
dynamically reference Sheet 1, something along the lines of =SUM(A3!H1:H9).

However using the dynamic cell reference A3 - it does not work!! Any ideas
on how to resolve this. I have tried absolute referencing, using single and
double quotes, but unable to achieve the desired result. Any assistance most
welcome!!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Using data in cell for sheet referencing in formulas

Any idea on what the syntax would be for the formula line? How is cell A3
referenced with the INDIRECT function?

So =SUM(Sheet1!H1:H9) becomes....................? (where cell A3 contains
the value Sheet1)

Many thanks

"Wigi" wrote:

You need to use the INDIRECT function.


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"MS_user" wrote:

I have a multi sheet spreadhseet in which the Sheet reference (from which i
require data) is held as cell data.

For example in Sheet 2 i have a reference in a cell A3 which contains the
data "Sheet 1". in attempting to dynamically access this sheet in a formula i
am trying to use A3 instead of the standard Sheet 1 that is automatically
used.

i.e. I am trying to replace formula is Sheet 2 from =SUM(Sheet1!H1:H9) to
dynamically reference Sheet 1, something along the lines of =SUM(A3!H1:H9).

However using the dynamic cell reference A3 - it does not work!! Any ideas
on how to resolve this. I have tried absolute referencing, using single and
double quotes, but unable to achieve the desired result. Any assistance most
welcome!!

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
Relative sheet referencing in excel formulas MichaelR Excel Worksheet Functions 1 June 3rd 08 11:19 PM
Excel 2003 - Referencing data in a table to use in formulas Rocketman Excel Worksheet Functions 8 February 28th 08 11:07 AM
Referencing cells with formulas results in blank cell. rdp Excel Worksheet Functions 1 December 4th 07 06:53 PM
Referencing every 5th cell in another sheet [email protected] Excel Worksheet Functions 4 June 20th 07 02:49 PM
referencing a sheet named in a cell then using data from that sheet gbeard Excel Worksheet Functions 4 April 15th 05 08:42 AM


All times are GMT +1. The time now is 07:03 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"