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

  • From: larryspcremedies@xxxxxxx
  • To: mso@xxxxxxxxxxxxx
  • Date: Tue, 14 Jul 2009 10:09:14 -0400

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
*************************************************************

Other related posts: