Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 119
Default INDIRECT for range of sheets

I want to sum cell D4 across a range of sheets.

I've got the first and last sheet names:
Hello my name is Gilbert (in cell C1)
I like squirrels (in cell C2

I've therefore put together:
=SUM(INDIRECT("'"&C1&":"&C2&"'!D4"))

The problem is the INDIRECT returns #REF! - I think because it's not a
single sheet reference.

What am I doing wrong?
How else can I do this?

Cheers,
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default INDIRECT for range of sheets

Create two helper sheets Call "First" and "Last"
"First" is far left of the sheets
"Last" is far right of the sheets

=SUM(First:Last!D4)


"mr tom" wrote:

I want to sum cell D4 across a range of sheets.

I've got the first and last sheet names:
Hello my name is Gilbert (in cell C1)
I like squirrels (in cell C2

I've therefore put together:
=SUM(INDIRECT("'"&C1&":"&C2&"'!D4"))

The problem is the INDIRECT returns #REF! - I think because it's not a
single sheet reference.

What am I doing wrong?
How else can I do this?

Cheers,

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 119
Default INDIRECT for range of sheets

Thanks - but this is designed for presentation purposes, so I can't have the
extra sheets hanging around in there.

I'm playing with the idea of using some VBA to do the job - but had hoped
there was a way of getting it to work with formulas.

Cheers,

Tom.

"Teethless mama" wrote:

Create two helper sheets Call "First" and "Last"
"First" is far left of the sheets
"Last" is far right of the sheets

=SUM(First:Last!D4)


"mr tom" wrote:

I want to sum cell D4 across a range of sheets.

I've got the first and last sheet names:
Hello my name is Gilbert (in cell C1)
I like squirrels (in cell C2

I've therefore put together:
=SUM(INDIRECT("'"&C1&":"&C2&"'!D4"))

The problem is the INDIRECT returns #REF! - I think because it's not a
single sheet reference.

What am I doing wrong?
How else can I do this?

Cheers,

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default INDIRECT for range of sheets

You can *hide* those sheets!

Works just as well, whether they're visible or not.
--

HTH,

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

"mr tom" <mr-tom at mr-tom.co.uk.(donotspam) wrote in message
...
Thanks - but this is designed for presentation purposes, so I can't have the
extra sheets hanging around in there.

I'm playing with the idea of using some VBA to do the job - but had hoped
there was a way of getting it to work with formulas.

Cheers,

Tom.

"Teethless mama" wrote:

Create two helper sheets Call "First" and "Last"
"First" is far left of the sheets
"Last" is far right of the sheets

=SUM(First:Last!D4)


"mr tom" wrote:

I want to sum cell D4 across a range of sheets.

I've got the first and last sheet names:
Hello my name is Gilbert (in cell C1)
I like squirrels (in cell C2

I've therefore put together:
=SUM(INDIRECT("'"&C1&":"&C2&"'!D4"))

The problem is the INDIRECT returns #REF! - I think because it's not a
single sheet reference.

What am I doing wrong?
How else can I do this?

Cheers,



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 119
Default INDIRECT for range of sheets

Thanks, but I've written some VBA to generate the formula for me based on
first and last sheets.

Cheers,

Tom.

"RagDyeR" wrote:

You can *hide* those sheets!

Works just as well, whether they're visible or not.
--

HTH,

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

"mr tom" <mr-tom at mr-tom.co.uk.(donotspam) wrote in message
...
Thanks - but this is designed for presentation purposes, so I can't have the
extra sheets hanging around in there.

I'm playing with the idea of using some VBA to do the job - but had hoped
there was a way of getting it to work with formulas.

Cheers,

Tom.

"Teethless mama" wrote:

Create two helper sheets Call "First" and "Last"
"First" is far left of the sheets
"Last" is far right of the sheets

=SUM(First:Last!D4)


"mr tom" wrote:

I want to sum cell D4 across a range of sheets.

I've got the first and last sheet names:
Hello my name is Gilbert (in cell C1)
I like squirrels (in cell C2

I've therefore put together:
=SUM(INDIRECT("'"&C1&":"&C2&"'!D4"))

The problem is the INDIRECT returns #REF! - I think because it's not a
single sheet reference.

What am I doing wrong?
How else can I do this?

Cheers,






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 340
Default INDIRECT for range of sheets

One way is to use a defined name. Enter

=IF(1,Evaluate,"sum('"&C1&":"&C2&"'!D4)")

in a cell. Then select A1 and define "Evaluate" to refer to:

=EVALUATE(EVALUATE("if("&MID(GET.CELL(6,!A1),6,255 )))

This should work for any formula of the form =IF(1,Evaluate,"String").





On 23 Apr, 13:32, mr tom <mr-tom at mr-tom.co.uk.(donotspam) wrote:
I want to sum cell D4 across a range of sheets.

I've got the first and last sheet names:
Hello my name is Gilbert (in cell C1)
I like squirrels (in cell C2

I've therefore put together:
=SUM(INDIRECT("'"&C1&":"&C2&"'!D4"))

The problem is the INDIRECT returns #REF! - I think because it's not a
single sheet reference.

What am I doing wrong?
How else can I do this?

Cheers,



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default INDIRECT for range of sheets

Try this:

=SUMPRODUCT(SUMIF(INDIRECT("'"&C1:C2&"'!D4"),"<") )

Biff

"mr tom" <mr-tom at mr-tom.co.uk.(donotspam) wrote in message
...
I want to sum cell D4 across a range of sheets.

I've got the first and last sheet names:
Hello my name is Gilbert (in cell C1)
I like squirrels (in cell C2

I've therefore put together:
=SUM(INDIRECT("'"&C1&":"&C2&"'!D4"))

The problem is the INDIRECT returns #REF! - I think because it's not a
single sheet reference.

What am I doing wrong?
How else can I do this?

Cheers,



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
Allow EXCEL INDIRECT(ADDRESS()) and INDIRECT(RANGE()) functions Mike Barlow Excel Worksheet Functions 7 May 21st 23 07:42 PM
INDIRECT and multiple sheets smaruzzi Excel Worksheet Functions 1 April 20th 07 10:18 PM
indirect function within sumif to reference other sheets [email protected] Excel Worksheet Functions 3 June 15th 06 05:46 PM
Indirect and Address in Reference to other sheets MikeDH Excel Worksheet Functions 0 August 11th 05 09:53 PM
Sum Indirect function through multiple sheets Andre Croteau Excel Discussion (Misc queries) 2 May 6th 05 10:44 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"