+ Reply to Thread
Results 1 to 8 of 8

Average from multiple tabs

  1. #1
    Registered User
    Join Date
    07-13-2013
    Location
    Pittsburgh
    MS-Off Ver
    Excel 2007
    Posts
    5

    Average from multiple tabs

    I’m trying to pull the average number for Mondays to put on a Q3 tab. It will pull from the July, Aug, and Sep tabs. But since there is nothing in the Aug or Sep tab yet I keep getting errors.
    I got a formula that will work for each month but cant combine the 3 to make it work without errors. Here are the 3 I need to combine and find a way to disregard empty cells. How can I make this work?

    =AVERAGE(AVERAGEIF(July!B3:B64,"Monday",July!V3:V64))
    =AVERAGE(AVERAGEIF(August!B3:B64,"Monday",August!V3:V64))
    =AVERAGE(AVERAGEIF(September!B3:B62,"Monday",September!V3:V62))

    Any help would be very appreciated…

  2. #2
    Forum Contributor
    Join Date
    05-24-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    291

    Re: Average from multiple tabs

    Try this..

    =AVERAGE(ISSERROR(AVERAGEIF(July!B3:B64,"Monday",July!V3:V64)),ISERROR(AVERAGEIF(August!B3:B64,"Monday",August!V3:V64)),ISERROR((AVERAGEIF(September!B3:B62,"Monday",September!V3:V62))

    if it doesn't work send some sample

    Thank,s
    A

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Average from multiple tabs

    AVERAGEIF won't work with 3d references.

    This will work...

    List the sheet names in a range of cells:

    A2 = July
    A3 = August
    A4 = September

    B2 = Monday

    Then:

    =SUMPRODUCT(SUMIF(INDIRECT("'"&A2:A4&"'!B3:B64"),B2,INDIRECT("'"&A2:A4&"'!V3:V64")))/SUMPRODUCT(COUNTIF(INDIRECT("'"&A2:A4&"'!B3:B64"),B2))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    07-13-2013
    Location
    Pittsburgh
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Average from multiple tabs

    Thanks guys but I still can’t get it to work. I think I’m not very good at explaining things, so I’ll just let you look at it.
    Here is a copy of the part of the worksheet I’m working on. I just threw some generic numbers in it for now. As of now on the July page, the daily average for Monday should say 4,500. But I keep coming up with 643 on the Q3 page. It is dividing it by the total number of Mondays in the 3rd quarter. I just need it to show the average to date for that quarter.
    It’s been breaking my brain for a few days now…

    Copy of 2013 Tracking.xlsx

  5. #5
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Average from multiple tabs

    Try it like this:

    =(SUMIF(July!B$3:B$64,A3,July!V$3:V$64)+SUMIF(August!B$3:B$64,A3,August!V$3:V$64)+SUMIF(September!B$3:B$64,A3,September!V$3:V$64))/(COUNTIFS(July!B$3:B$64,A3,July!V$3:V$64,"<>")+COUNTIFS(August!B$3:B$64,A3,August!V$3:V$64,"<>")+COUNTIFS(September!B$3:B$64,A3,September!V$3:V$64,"<>"))

    See the attached
    Attached Files Attached Files

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Average from multiple tabs

    The problem with your formula is that the division denominator is not being calculated correctly.

    On your Q3 sheet in A2:A9 drop the "s" from the weekdays.

    Then, if you want to use the same basic formula that you're currently using:

    =(SUMIF(July!B$3:B$64,A3,July!V$3:V$64)+SUMIF(August!B$3:B$64,A3,August!V$3:V$64)+SUMIF(September!B$3:B$62,A3,September!V$3:V$62))/(COUNTIFS(July!B$3:B$64,A3,July!V$3:V$64,"<>")+COUNTIFS(August!B$3:B$64,A3,August!V$3:V$64,"<>")+COUNTIFS(September!B$3:B$62,A3,September!V$3:V$62,"<>"))

    Or, if you want to do it as I first suggested:

    A13:A15 = the sheet names: July, August. September

    Then:

    =SUMPRODUCT(SUMIF(INDIRECT("'"&A$13:A$15&"'!B3:B64"),A3,INDIRECT("'"&A$13:A$15&"'!V3:V64")))/SUMPRODUCT(COUNTIFS(INDIRECT("'"&A$13:A$15&"'!B3:B64"),A3,INDIRECT("'"&A$13:A$15&"'!V3:V64"),"<>"))
    Last edited by Tony Valko; 07-14-2013 at 11:36 AM.

  7. #7
    Registered User
    Join Date
    07-13-2013
    Location
    Pittsburgh
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Average from multiple tabs

    Thank you so much Tony. That works perfectly. You are my new hero…

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Average from multiple tabs

    You're welcome. Thanks for the feedback!

+ 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