+ Reply to Thread
Results 1 to 6 of 6

Countifs or AverageIfs

  1. #1
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Countifs or AverageIfs

    I would like to use the countifs or averageifs formula where if any of the criteria values (A2, B2 or C2) are blank the result is the count or average of the other two (or one) criteria values and NOT the count or average of all three criteria values (the second/third would be looking for blanks and not just considering the other one or two criteria). So taking the example below, I want to average the "one" column if the "two" column equals the value in A2 and the "three" column equals B2 and the "four" column equals C2. BUT, say A2 is blank. In this case, I want to disregard the "two" column entirely and just do the average if B2 is found in "three" and C2 is found in "four". The same would go for if any B2 and/or C2 is blank; I would would just want to take the average if of the other one or two criteria. The attached example will be the easiest way to understand the issue and the result I am trying to get at.

    =AVERAGEIFS(One,two,A2,three,B2,four,C2)

    I created a workaround with IF statement dummy formulas that essentially say "if my criteria cell is blank, give me some standard value so the end formula gives me what I want but this is entirely too inefficient and my spreadsheet is now too large and slow. There must be an easier way, no?

    Help!?
    Attached Files Attached Files
    Last edited by dreicer_Jarr; 03-12-2013 at 09:38 PM.
    ______________________________________
    "Vision without Execution is a Hallucination"
    Edison

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,077

    Re: Countifs or AverageIfs

    Try
    =SUM(A2:C2)/COUNTA(A2:C2)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Re: Countifs or AverageIfs

    "One", "Two", "Three" and "Four" are ranges that each represent a very long column of data. "One" has the values I want to average and the other three ranges contain the data the formula evaluates to decide whether or not to average the values in the "one" column. Your formula only addresses the input (criteria) cells, unless I am misunderstanding? I apologize for not being more clear to begin with.

    Thanks,

    J
    Last edited by dreicer_Jarr; 03-12-2013 at 08:49 PM.

  4. #4
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Re: Countifs or AverageIfs

    Take a look at the example I attached, please!

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

    Re: Countifs or AverageIfs

    Try to put * in L1 instead of blank

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Countifs or AverageIfs

    Try this formula in M3.you can Keep any of the K1, L1, M1 cells blank.

    Eg: If K1 is blank It gives average of all L1 & M1.

    Please Login or Register  to view this content.
    Last edited by kvsrinivasamurthy; 03-13-2013 at 02:52 AM.

+ 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