+ Reply to Thread
Results 1 to 6 of 6

Finding sum of A1 in all tabs

  1. #1
    Registered User
    Join Date
    01-15-2012
    Location
    Noneofyourbusiness, CO
    MS-Off Ver
    Excel 2007
    Posts
    34

    Finding sum of A1 in all tabs

    Hello!

    Thanks to the help of the wonderful people on this forum I've been able to do a lot of things with excel that has to do with counting and finding sums based on dates and other criteria. Most of the files I've been using them on are only used for one year and therefore no new tabs for new years are created. This project I'm working on now references the A1 cell in tabs that are each designated for a year (One tab is "2012", another is "2011", etc). Well, I was just wondering if there was a way to reference A1 on all tabs created without having to enter in the name of the tab. Right now I'm using the formula =(('2012'!A1)+('2011'!A1)+...) but it's going to be a pain to change all of the formulas every year (I won't be referencing just A1). Is there a way to pull the sum of all of the A1's in all the tabs regardless of name and number of tabs? I hope this makes sense.

    Any help offered would be greatly appreciated. Have a wonderful day!

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Finding sum of A1 in all tabs

    This can be done very easily using a macro or a user-defined function (both use vba). Also if you want a formula then you can create a macro that will write the formula once. You can then just run it again when you add new sheets.

    Let us which option you prefer.

    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Finding sum of A1 in all tabs

    Try

    =SUM(Sheet1:Sheet5!A1)

    Change the sheet names to match your requirements

    or better yet

    Make two sheet First and Last

    Put all sheets in between those two sheets.

    then

    =SUM(First:Last!A1)
    HTH
    Regards, Jeff

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Finding sum of A1 in all tabs

    Hi Caulerpa,

    If you want to sum a cell across multiple sheets, those sheets should be contiguous in the tab order from left to right. For example, if your sheets are 2012, 2011, 2010 and 2009, and if you want to sum cell A1 on those four sheets, you could use:

    =SUM(2012:2009!A1)

    If you have sheets physically in between these sheets that you don't want counted, this won't work. (E.g. your sheets are 2012, 2012revised, 2011, 2011 revised, etc. - this formula would sum cell A1 on all of the sheets physically between sheets 2012 and 2009.)

    This doesn't work for a number of functions, so if your formulas get more complex you may need to resort to UDF (User-Defined Functions) or macros.

  5. #5
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Finding sum of A1 in all tabs

    Jeff and Paul give great examples. One small addition, if there is certain sheets you don't want added then you can use something like (borrowing a mix of Jeff and Paul's examples):

    =SUM(First:Last!A1)-2012revised!A1

    Hope this helps.

    abousetta

  6. #6
    Registered User
    Join Date
    01-15-2012
    Location
    Noneofyourbusiness, CO
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Finding sum of A1 in all tabs

    Thank you everyone for your help! Every comment was very useful! I'll try to ask less questions and answer some posts if I can. Have a wonderful weekend!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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