Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Use cell contents to make formula reference

Is there a way to use the contents of a cell to substitute for a portion of a
cell reference?

Example:
I have worksheets named 1, 2, 3. I would like a summary page to evaluate
either sheet 1, sheet 2 or sheet 3 for a given set of variables.

Instead of hard coding the sheet.cell reference in the formula on the
summary page, I would like to use cell $a$1 as a variable to modify the
formula. Can I write the formula to calculate (for example, an average) any
sheet based on the sheet name I type in cell A1. So, insted of the formula

=Average(1!A4:F4)

I would like to use cell A1 as the place I store the variable. (The
variable being the sheet name "1"). Theoretically, that would mean my
formula would look something like

=Average($A$1!A4:F4)

Is anything like this possible?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Use cell contents to make formula reference

Sherri,

=AVERAGE(INDIRECT(A1&"!A4:F4"))


"Sherri" wrote in message
...
Is there a way to use the contents of a cell to substitute for a portion

of a
cell reference?

Example:
I have worksheets named 1, 2, 3. I would like a summary page to evaluate
either sheet 1, sheet 2 or sheet 3 for a given set of variables.

Instead of hard coding the sheet.cell reference in the formula on the
summary page, I would like to use cell $a$1 as a variable to modify the
formula. Can I write the formula to calculate (for example, an average)

any
sheet based on the sheet name I type in cell A1. So, insted of the

formula

=Average(1!A4:F4)

I would like to use cell A1 as the place I store the variable. (The
variable being the sheet name "1"). Theoretically, that would mean my
formula would look something like

=Average($A$1!A4:F4)

Is anything like this possible?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Use cell contents to make formula reference

Or more accurately since you only want "1" in the cell

=AVERAGE(INDIRECT("Sheet" & A1 &"!A4:F4"))


"Sherri" wrote in message
...
Is there a way to use the contents of a cell to substitute for a portion

of a
cell reference?

Example:
I have worksheets named 1, 2, 3. I would like a summary page to evaluate
either sheet 1, sheet 2 or sheet 3 for a given set of variables.

Instead of hard coding the sheet.cell reference in the formula on the
summary page, I would like to use cell $a$1 as a variable to modify the
formula. Can I write the formula to calculate (for example, an average)

any
sheet based on the sheet name I type in cell A1. So, insted of the

formula

=Average(1!A4:F4)

I would like to use cell A1 as the place I store the variable. (The
variable being the sheet name "1"). Theoretically, that would mean my
formula would look something like

=Average($A$1!A4:F4)

Is anything like this possible?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Use cell contents to make formula reference

Sometimes, you need to surround the sheet name with apostrophes.

=Average(indirect("'" & $A$1 &"'!A4:F4"))

If you don't need them, it won't hurt. But if you do need them, er, you need
them.

Sherri wrote:

Is there a way to use the contents of a cell to substitute for a portion of a
cell reference?

Example:
I have worksheets named 1, 2, 3. I would like a summary page to evaluate
either sheet 1, sheet 2 or sheet 3 for a given set of variables.

Instead of hard coding the sheet.cell reference in the formula on the
summary page, I would like to use cell $a$1 as a variable to modify the
formula. Can I write the formula to calculate (for example, an average) any
sheet based on the sheet name I type in cell A1. So, insted of the formula

=Average(1!A4:F4)

I would like to use cell A1 as the place I store the variable. (The
variable being the sheet name "1"). Theoretically, that would mean my
formula would look something like

=Average($A$1!A4:F4)

Is anything like this possible?


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 464
Default Use cell contents to make formula reference

Sometimes, you need to surround the sheet name with apostrophes

Yes, if the sheet tab name has a space character.



--
Regards
Dave Hawley
www.ozgrid.com
"Dave Peterson" wrote in message
...
Sometimes, you need to surround the sheet name with apostrophes.

=Average(indirect("'" & $A$1 &"'!A4:F4"))

If you don't need them, it won't hurt. But if you do need them, er, you
need
them.

Sherri wrote:

Is there a way to use the contents of a cell to substitute for a portion
of a
cell reference?

Example:
I have worksheets named 1, 2, 3. I would like a summary page to evaluate
either sheet 1, sheet 2 or sheet 3 for a given set of variables.

Instead of hard coding the sheet.cell reference in the formula on the
summary page, I would like to use cell $a$1 as a variable to modify the
formula. Can I write the formula to calculate (for example, an average)
any
sheet based on the sheet name I type in cell A1. So, insted of the
formula

=Average(1!A4:F4)

I would like to use cell A1 as the place I store the variable. (The
variable being the sheet name "1"). Theoretically, that would mean my
formula would look something like

=Average($A$1!A4:F4)

Is anything like this possible?


--

Dave Peterson


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 contents from a reference NimbleThunder Excel Discussion (Misc queries) 4 December 29th 09 06:28 AM
How do I make a cell Flash on and off it's contents? MichaelD Excel Worksheet Functions 1 December 18th 08 08:25 PM
How do I make the contents of a cell appear to flash? SafetyLen Excel Worksheet Functions 2 June 15th 07 02:07 AM
Make cell contents a reference nobbyknownowt Excel Discussion (Misc queries) 4 April 17th 06 10:00 AM
Reference cell contents Jeanette Deleon Excel Discussion (Misc queries) 0 June 28th 05 05:42 AM


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