#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 109
Default Sum Worksheets

Having searched and read similar queries regarding summing there was a
reference to the website: http://www.mcgimpsey.com/excel/threedsumif.html

Adapting the formula provided and (with great originality) naming my
worksheets to sum, "worksheets_to_sum", the following formula works great.

=SUMPRODUCT(SUMIF(INDIRECT("'"&Worksheets_To_Sum&" '!A14:A23"),$A19,INDIRECT("'"&Tabs&"'!B14:B23")))

However I wish to copy and paste the formula to several other columns so
that columns C onwards can be summed. In its current form the sum range
remains static at B14:B23.

I attempted to correct this by adding a header row that would indicate the
column to be summed, e.g. Cell D17

=SUM(...INDIRECT(" ' "&Tabs&" ' ! & D17 & "14:" & D17 & "23")))

This did not work. Any ideas?


Thanking-you,

Neil


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Sum Worksheets

Hi,

I tried the formula which you mentioned, and it did work for me.

=SUMPRODUCT(SUMIF(INDIRECT("Worksheets_To_Sum!A14: A23"),$A19,INDIRECT("Tabs!"&D17&"14:"&D17&"23")))

I hope you have the column name i.e. if you want to sum column "E" then cell
D17 reflects "E" and not 5.

Check if there is some problem with your data.
--
Cheers.

Rodrick


"Neil Pearce" wrote:

Having searched and read similar queries regarding summing there was a
reference to the website: http://www.mcgimpsey.com/excel/threedsumif.html

Adapting the formula provided and (with great originality) naming my
worksheets to sum, "worksheets_to_sum", the following formula works great.

=SUMPRODUCT(SUMIF(INDIRECT("'"&Worksheets_To_Sum&" '!A14:A23"),$A19,INDIRECT("'"&Tabs&"'!B14:B23")))

However I wish to copy and paste the formula to several other columns so
that columns C onwards can be summed. In its current form the sum range
remains static at B14:B23.

I attempted to correct this by adding a header row that would indicate the
column to be summed, e.g. Cell D17

=SUM(...INDIRECT(" ' "&Tabs&" ' ! & D17 & "14:" & D17 & "23")))

This did not work. Any ideas?


Thanking-you,

Neil


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 109
Default Sum Worksheets

Sorry for the typo. Should have been...

=SUMPRODUCT(SUMIF(INDIRECT("'"&Worksheets_To_Sum&" '!A14:A23"),$A19,INDIRECT("'"&Worksheets_To_Sum&"' !B14:B23")))

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Sum Worksheets

are you getting an error message or is it just summing to zero?

If you are getting an error message, could you please let me know.
--
Cheers.

Rodrick


"Neil Pearce" wrote:

Sorry for the typo. Should have been...

=SUMPRODUCT(SUMIF(INDIRECT("'"&Worksheets_To_Sum&" '!A14:A23"),$A19,INDIRECT("'"&Worksheets_To_Sum&"' !B14:B23")))

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 109
Default Sum Worksheets

Hi Rodrick,

Thanks for helping me out here. I get a #REF! error message.

=SUMPRODUCT(SUMIF(INDIRECT("'"&Worksheets_To_Sum&" '!A2:A11"),$A3,INDIRECT("'"&Worksheets_To_Sum&"'!B 2:B11")))

Works fine.

I just amend the forumla such that the B2:B11 instead references a cell that
dictates the column to sum.




"Rodrick" wrote:

are you getting an error message or is it just summing to zero?

If you are getting an error message, could you please let me know.
--
Cheers.

Rodrick


"Neil Pearce" wrote:

Sorry for the typo. Should have been...

=SUMPRODUCT(SUMIF(INDIRECT("'"&Worksheets_To_Sum&" '!A14:A23"),$A19,INDIRECT("'"&Worksheets_To_Sum&"' !B14:B23")))



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Sum Worksheets

could you confirm that you have the valid tab name in the cell which you have
named as "Worksheet_To_Sum"?

You are getting this error message because formula is not able to get the
valid sheet name in the workbook which you have mentioned in the
"Worksheet_To_Sum" cell.
--
Cheers.

Rodrick


"Neil Pearce" wrote:

Hi Rodrick,

Thanks for helping me out here. I get a #REF! error message.

=SUMPRODUCT(SUMIF(INDIRECT("'"&Worksheets_To_Sum&" '!A2:A11"),$A3,INDIRECT("'"&Worksheets_To_Sum&"'!B 2:B11")))

Works fine.

I just amend the forumla such that the B2:B11 instead references a cell that
dictates the column to sum.




"Rodrick" wrote:

are you getting an error message or is it just summing to zero?

If you are getting an error message, could you please let me know.
--
Cheers.

Rodrick


"Neil Pearce" wrote:

Sorry for the typo. Should have been...

=SUMPRODUCT(SUMIF(INDIRECT("'"&Worksheets_To_Sum&" '!A14:A23"),$A19,INDIRECT("'"&Worksheets_To_Sum&"' !B14:B23")))

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 109
Default Sum Worksheets

Starting from the basics.

3 worksheets titled 1,2 & 3.
All worksheets have 10 in cell A1

4th worksheet titled Summary
Cell A1 = 1
Cell A2 = 2
Cell A3 = 3

Highlight Cells A1:A3 on Summary and define them as the name, Tabs.

Cell A5, enter =SUM(1:3!A1)
Cell A5 correctly displays 30

Cell A6, enter =SUM(INDIRECT(" ' "&Tabs&" ' ! A1 ")
Cell A6 displays #VALUE ERROR!

I'm missing something fairly fundamental and pretty obvious it would appear!
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
Master Worksheets and Individual Worksheets PADutchFireman Excel Worksheet Functions 1 April 2nd 09 05:59 PM
Sum worksheets - w/o updating formula for new worksheets which are Elgee Excel Worksheet Functions 4 August 15th 08 05:51 PM
How use info in Excel shared worksheets to create new worksheets dkc Excel Worksheet Functions 0 June 28th 07 08:36 PM
How do i assign the ActiveWorkbook.Worksheets to a worksheets object? TS Excel Worksheet Functions 2 December 27th 06 02:49 PM
Assigning Cells in worksheets to other data in other worksheets. David McRitchie Excel Discussion (Misc queries) 0 November 27th 04 06:15 PM


All times are GMT +1. The time now is 10:28 AM.

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"