+ Reply to Thread
Results 1 to 5 of 5

Averageif from columns of different tables?

  1. #1
    Registered User
    Join Date
    04-11-2022
    Location
    calgary, Canada
    MS-Off Ver
    Office 365, Excel for Mac
    Posts
    15

    Question Averageif from columns of different tables?

    Hi all,

    I've got tables in different sheets in a relatively large workbook that I need to grab the total average across columns from the different tables.

    The best I could come up with is something like:

    =SUMPRODUCT(SUMIF(INDIRECT({"table1","Table3"}&"[propertytype]"),"detached",INDIRECT({"table1","Table3"}&"[price]")))/SUMPRODUCT(COUNTIF(INDIRECT({"table1","table3"}&"[propertytype]"),"detached"))

    Is there a better way to do this?

    See attached for an example of what I'm talking about.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Averageif from columns of different tables?

    Hi,

    If the tables have the same structure - you can use this in Sheet1, B2 and across:
    AVERAGE(Sheet2:Sheet3!B2)
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Averageif from columns of different tables?

    I can't think of a much more concise way. I think SUM rather than SUMPRODUCT does the same thing.

    You can probably do something complex to end up with a single-column array built from all of the tables, and then wrap that in AVERAGE, but I doubt it would be better than just using SUMIF and COUNTIF as you have done.

  4. #4
    Registered User
    Join Date
    04-11-2022
    Location
    calgary, Canada
    MS-Off Ver
    Office 365, Excel for Mac
    Posts
    15

    Re: Averageif from columns of different tables?

    I need to use criteria from the first column though? hence why I am using sumif and countif

  5. #5
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Averageif from columns of different tables?

    I think you have to get all your tables to be in same structure in order to be able to have a summary sheet.
    you can make a PIVOTABLE in each sheet showing the SUM and count of each item.
    (Let's say that all of them will start at line 7, like in the attached example)

    then in your summary table do a sum across sheets (SUM(Sheet2:Sheet3!B7)), and you will be able to make the AVERAGE of each item by dividing the SUM by COUNT.

    See attached, I have applied it in your sample workbook.
    Attached Files Attached Files

+ 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. [SOLVED] Averageif between different columns
    By asdnator in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-30-2017, 03:06 PM
  2. [SOLVED] Averageif across multiple columns
    By Tleuthe in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-19-2017, 10:52 AM
  3. Getting an average across columns with AverageIf
    By anthony1312002 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-31-2017, 08:53 AM
  4. Use of Averageif on Multiple Columns
    By matubis.jp in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-13-2015, 05:19 PM
  5. AVERAGEIF for many cells/columns
    By cyph in forum Excel Formulas & Functions
    Replies: 23
    Last Post: 04-30-2015, 04:32 AM
  6. AverageIf of two columns
    By dt32 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-09-2013, 10:47 AM
  7. Pivot tables and AVERAGEIF function
    By justinsmyth1 in forum Excel General
    Replies: 1
    Last Post: 05-10-2011, 02:23 AM

Tags for this Thread

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