+ Reply to Thread
Results 1 to 7 of 7

Sum Across sheets

  1. #1
    Registered User
    Join Date
    10-14-2013
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    31

    Sum Across sheets

    I have a series of 12 sheets each named as a month
    I wish to find the cumulative value of a cell in each month

    So the January sheet would have a value .Range("AP9").Value
    the February Sheet would have a value January!AP9 + February!AP9
    March January!Ap9 + February!AP9 + March!AP9 and so on

    I triedto achieve this with the following code
    Please Login or Register  to view this content.
    But this does nor work, the initial = sign causes an error, but without the sign all I have is a string not a formula
    I need some help please
    LoftySuth

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Sum Across sheets

    Check this out...........in each sheet, cell AP9 contains the monthly amount and cell B10 contains the accumulative YTD amount:

    Please Login or Register  to view this content.
    Note that the January formula is unlike the other 11 formulas.
    Gary's Student

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Sum Across sheets

    Unless you reallywant to use a macro for this, a relatively simple =SUM() will give you the results you need...
    =SUM('Jan:Dec'!A1)

    Adjust sheet names as needed
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Sum Across sheets

    I was also working on this.

    combining my effort with Jakobshavn's:-

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Sum Across sheets

    it occurs to me that you might want to sort the sheets first.

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Sum Across sheets

    Alternatively you could use the Month Names instead of assuming that the sheets are sequential.

    This is probably the most robust solution.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-14-2013
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Sum Across sheets

    Thank you all for your ideas. The key revelation to me was Sheets.Range.Formula. I don't really want to use a cumulative Cell (B10) but I think I will be able to write an accumulating string as in my original post (SFormula = SFormula &.....). Once again many thanks for all your contributions my jaw dropped when I opened up the Forum!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 10-04-2013, 04:21 AM
  2. [SOLVED] Macro to Unprotect sheets-unlock range of cells-protect sheets
    By jrace in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-09-2013, 10:45 AM
  3. Replies: 17
    Last Post: 02-01-2013, 12:20 PM
  4. Replies: 2
    Last Post: 01-18-2012, 05:08 AM
  5. [SOLVED] Macro for filter on protected workbook that works for all sheets, no matter what sheets are named?
    By StargateFanFromWork in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-26-2006, 02:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1