[mso] Re: Syntax Problem with SUM and INDIRECT functions

  • From: "David Smart" <smartware@xxxxxxxxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Wed, 15 Jul 2009 13:23:50 +1000

I think that Indirect () does indeed have a problem with a 3D reference. 
E.g.

=SUM(INDIRECT("'Sheet 1'!a12:c14"))

works fine but

=SUM(INDIRECT("'Sheet 1:Sheet 2'!a12:c14"))

fails.

So this approach is not going to work.

FWIW  I do the same thing as Hutch is suggesting - i.e. dummy first and last 
sheets.  This has a couple of advantages too:

- It doesn't matter what the inner sheets are called, so they can have 
meaningful names, such as the persons' names if the sheets are one per 
person.

- You don't need to maintain a separate "number of sheets" cell, that could 
get out of step.

Regards, Dave S

----- Original Message ----- 
From: <larryspcremedies@xxxxxxx>
To: <mso@xxxxxxxxxxxxx>
Sent: Wednesday, July 15, 2009 12:09 AM
Subject: [mso] Re: Syntax Problem with SUM and INDIRECT functions


> Dave, Thanks for the response, but even with your suggestion, I still get 
> a #REF error.
> When I show the calculation steps, the evaluated INDIRECT("'Datasheet 
> 1:Datasheet 5'!G40:G60") is underlined with "The next evaluation will 
> result in an error".
>
> I'm thinking that INDIRECT doesn't evaluate a range properly. What do you 
> think?
>
> Larry
>
>
> -----Original Message-----
>
>
> ----------------------------------------------------------------------
> From: "David Smart" <smartware@xxxxxxxxxxxxxxx>
> Subject: [mso] Re: Syntax Problem with SUM and INDIRECT functions
> Date: Tue, 14 Jul 2009 14:10:58 +1000
>
> Indirect () is not used for part of an address - it is used for the whole
> address.  I.e. it should immediately follow the opening parenthesis of the
> Sum and its closing parenthesis and the Sum's closing parenthesis would be
> together.  I.e., if you had
>
> =SUM('Datasheet 1:Datasheet 5'!G40:G60)
>
> You'd want
>
> =SUM(Indirect("'Datasheet 1:Datasheet " & 'Worktable'!$A$2 & "'!G40:G60"))
>
> Note the use of the single quotes to form up the sheet reference range.
> You've got to be careful with them.
>
> I suggest you start with a cell with the formula from the inside of the
> Indirect, i.e.
>
> ="'Datasheet 1:Datasheet " & 'Worktable'!$A$2 & "'!G40:G60"
>
> and work on this until it looks exactly right.  Then insert the
> Sum(Indirect( at the front and the two closing parentheses at the end.
>
>
>
> Regards, Dave S
>
>
>
> *************************************************************
> You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
> MicrosoftOffice@xxxxxxxxxxxxxxxx
>
> To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
>
> To Unsubscribe from this group, visit the group's homepage and use the 
> dropdown menu at the top.  This will allow you to unsubscribe your email 
> address or change your email settings to digest or vacation (no mail).
> //www.freelists.org/webpage/mso
>
> To be able to share files with the group, you must join our Yahoo sister 
> group.  This group will not allow for posting of emails, but will allow 
> you to join and share problem files, templates, etc.: 
> http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for 
> FILE SHARING ONLY.
>
> If you are using Outlook and you see a lot of unnecessary code in your 
> email messages, read these instructions that explain why and how to fix 
> it:
> http://personal-computer-tutor.com/abc3/v28/greg28.htm
> *************************************************************


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.375 / Virus Database: 270.13.14/2238 - Release Date: 07/14/09 
05:56:00

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the dropdown 
menu at the top.  This will allow you to unsubscribe your email address or 
change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to share files with the group, you must join our Yahoo sister group. 
 This group will not allow for posting of emails, but will allow you to join 
and share problem files, templates, etc.:  
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE 
SHARING ONLY.

If you are using Outlook and you see a lot of unnecessary code in your email 
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************

Other related posts: