+ Reply to Thread
Results 1 to 7 of 7

AverageIFS (or even SUMIFS/COUNTIFS) on large data set

  1. #1
    Registered User
    Join Date
    11-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    8

    AverageIFS (or even SUMIFS/COUNTIFS) on large data set

    I am running out of time on a project and I need to average numbers in a large data set using multiple criteria.

    It contains multiple years worth of data and some years do not contain the same row variables. The column headings remain the same.

    I want an average, for cell values greater than 0, when the formula matches multiple criteria - two row criteria ranges and one column range (spanning 7 columns).

    Here is the formula I tried to use - with the data in Sheet 2. Sheets 1 and 2 are set up with the variable labels in the same columns and rows - except that sheet 2 has far more information that I am trying to average ultimately based on non-duplicated row criteria in sheet1:

    =IFERROR(AVERAGEIFS('Sheet2'!$D$3:$J$1973,'Sheet2'!$D$3:$J$1973,">0",'Sheet1'!D$2:J$2,'Shee1'!D$2,'Sheet1'!$B$3:$B$505,'Sheet1'!$B3,'2013'!$C$3:$C$505,'Sheet1'!$C3),0)

    It does not appear to be working. Without the IFERROR, I just get #VALUE!. I have no idea why I cannot get the formula to work.

  2. #2
    Registered User
    Join Date
    11-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: AverageIFS (or even SUMIFS/COUNTIFS) on large data set

    I would even be willing to use the average function in a pivot table if I could get it to ignore zeros!

    Not sure how to do that in a pivot.

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: AverageIFS (or even SUMIFS/COUNTIFS) on large data set

    In your formula some of the references are single column and some of them are multi column refer the classification for details…

    Average Range = Sheet2'!$D$3:$J$1973 = Multi Column
    Condition Applied to = 'Sheet2'!$D$3:$J$1973,">0" = Multi Column
    Condition Applied to = 'Sheet1'!D$2:J$2,'Shee1'!D$2 = Multi Column
    Condition Applied to = 'Sheet1'!$B$3:$B$505,'Sheet1'!$B3 = Single Column
    Condition Applied to ='2013'!$C$3:$C$505,'Sheet1'!$C3 = Single column

    For your info Averageif won’t work with Closed Workbooks.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Registered User
    Join Date
    11-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: AverageIFS (or even SUMIFS/COUNTIFS) on large data set

    What is a closed workbook? How is that different than any other workbook?

    Is it inappropriate in the syntax of the formula to mix multi-column and single column? I have no idea what you mean by refer to the classification. Is that a reference manual somewhere? ( talk to me like I'm 5 and completely, almost, ignorant about Excel jargon )

    I think I found a solution using a pivot table, but it doesn't ignore zeros. Better than nothing, I guess.

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: AverageIFS (or even SUMIFS/COUNTIFS) on large data set

    What is a closed workbook? How is that different than any other workbook?
    The Sumif(s),Countif(s),Averageif(s) will only work with the external references when the file is kept open. When the file is not in open then the above formula’s won’t work and you need to keep the source workbooks open to get the result.

    Is it inappropriate in the syntax of the formula to mix multi-column and single column?
    Yes Sumif(s) and Averageif(s) will match the conditions on single column alone and the resulting column should also single.

    I have no idea what you mean by refer to the classification.
    I just differentiated your references in detail with Columns Count and I called that detail as classification.

    I think I found a solution using a pivot table, but it doesn't ignore zeros. Better than nothing, I guess.
    We can achieve it with formula itself but we need clear picture.

  6. #6
    Registered User
    Join Date
    11-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: AverageIFS (or even SUMIFS/COUNTIFS) on large data set

    Thank you. That was most helpful.

    I may want to revisit the formula-based solution for later. For now, I was able to find a solution using a pivot table and manipulating the data directly to avoid the zero problem.

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: AverageIFS (or even SUMIFS/COUNTIFS) on large data set

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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] Averageifs Countifs function
    By vandan_tanna in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-16-2013, 11:14 AM
  2. Countifs or AverageIfs
    By dreicer_Jarr in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-13-2013, 02:44 AM
  3. Replies: 3
    Last Post: 12-16-2011, 10:55 AM
  4. Countifs and Averageifs
    By tradergreg in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-08-2011, 07:20 PM
  5. Replies: 0
    Last Post: 11-15-2007, 05:24 AM

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