If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Sum Across multiple worksheets

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-08-11, 13:32
dbshaft dbshaft is offline
Registered User
 
Join Date: May 2009
Posts: 85
Sum Across multiple worksheets

I have been combing through the forums and haven't found a definitive answer to this. How can i get the sum of the same cell from multiple worksheets without knowing the exact name of the worksheet. I have an excel spreadsheet that i have purchase orders in and every purchase order has its own worksheet and the name of the worksheet is the purchase order number so the sheets have random numbers that i don't want to have to input separately. The total for that PO is in the same cell on every worksheet. I would like to sum this cell to keep track of how much i spend with each supplier. Seems like a simple problem but i'm not as skilled with Excel as i am with Access. Any help would be greatly appreciated. Essentially i want the sum of all the numbers from cell J48 from all worksheets within the same workbook, so if i add more purchase order it will automatically propagate.
Reply With Quote
  #2 (permalink)  
Old 08-09-11, 18:50
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 495
One way to do this is to set up two "buffer" sheets. One buffer is placed at the beginning of the workbook (except for your summary sheet), the other at end of the workbook and both are left empty. New sheets added to the workbook should be placed inbetween the two buffer sheets. Your SUM formula references the dummy sheets, thus totalling everything between them.
__________________
Colin

RAD Excel Blog

Other tutorials:
Array Formulas | Deleting Rows with VBA
Reply With Quote
  #3 (permalink)  
Old 08-11-11, 13:18
dbshaft dbshaft is offline
Registered User
 
Join Date: May 2009
Posts: 85
Right now i can't even get a sum of all the worksheets much less make it dynamic. Right now the only way to get a sum is to
=SUM('52777'!J48,'52777'!J48,'52781'!J48,'52788'!J 48,'52790'!J48) and so on until i select all of the worksheets in the workbook, which is very time consuming.
Reply With Quote
  #4 (permalink)  
Old 08-11-11, 15:12
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 495
Ah, your formula's wrong. It'd be like this:

=SUM('52777:52790'!J48)

This will sum all the J48 cells on the sheets between '52777' and '52790' inclusive. So in the scenario I described, the two sheets referenced in this formula would be the empty "buffer" sheets.
__________________
Colin

RAD Excel Blog

Other tutorials:
Array Formulas | Deleting Rows with VBA
Reply With Quote
  #5 (permalink)  
Old 08-11-11, 22:16
dbshaft dbshaft is offline
Registered User
 
Join Date: May 2009
Posts: 85
I did as you suggested and added a Sheet1 and Sheet2 to the beginning and end of the workbook, with the formula
=SUM('sheet1:sheet2'!J48)
and it works great, Thank you for the help, it's much appreciated.

Last edited by dbshaft; 08-11-11 at 22:22.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On