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 ----- Original Message ----- From: <larryspcremedies@xxxxxxx> To: <mso@xxxxxxxxxxxxx> Sent: Tuesday, July 14, 2009 4:32 AM Subject: [mso] Syntax Problem with SUM and INDIRECT functions >I am developing a worksheet that will have a number of data spreadsheets >and a summary spreadsheet. > > > In the summary spreadsheet, I have a cells with the SUM function. > e.g. =SUM('Datasheet 1:Datasheet 5'!G40:G60) > > > Now this works fine if I have a fixed number of data spreadsheets. > > > However, I would like to be able to insert new data spreadsheets at the > end, and automatically include them in the SUM functions in the summary > spreadsheet by maintaining a cell in another spreadsheet containing the > number of data spreadsheets. I've named this last spreadsheet "Worktable" > > > Lets say I have five?data spreadsheets named with the prefix "Datasheet " > and suffixed with a sequential number starting with 1 and ending in 5 > (they are in order in the worksheet following the Summary and Worktable > worksheets. > > > In the Summary sheet I have coded a cell with > =SUM('Datasheet 1:INDIRECT("Datasheet " & 'Worktable'!$A$2)'!G40:G60) > > > This results in a syntax error. > > > I've tried a whole host of iterations to come up with the proper syntax > (too many to list here), all of them results in no joy in Mudville. > > > Can I do what I want to do? > > > Any help or advice would be appreciated. > > Larry > > > > > > ************************************************************* > 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.13/2236 - Release Date: 07/13/09 17:57: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 *************************************************************