+ Reply to Thread
Results 1 to 5 of 5

Average IFs multiple criteria issues

  1. #1
    Forum Contributor
    Join Date
    01-25-2013
    Location
    near Philly, PA USA
    MS-Off Ver
    Excel 2019
    Posts
    182

    Average IFs multiple criteria issues

    In the attached sample, in the pink cells, I'm attempting to take the average values of the blue shaded area depending on the values in the yellow shaded area.
    For example, for all Pretreatment values between a range, what is the average Treatment values associated with them.
    I think I have some of the pink Pretreatment values right but not the Treatment values.

    I appreciate the help!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Average IFs multiple criteria issues

    If you're really using Excel 2013, you have the IFERROR function. You could simplify your formulas by using it. For example, you have

    AV5: =IF(ISERROR(AVERAGEIFS($F5:$AK8,$F5:$AK8,">3", $F5:$AK8,"<6")),"",AVERAGEIFS($F5:$AK8,$F5:$AK8,">3", $F5:$AK8,"<6"))

    which could be simplified to

    AV5: =IFERROR(AVERAGEIFS($F5:$AK8,$F5:$AK8,">3",$F5:$AK8,"<6"),"")

    For that matter, you could use some clever text parsing on AV2:AX2 to get the range bounds, e.g.,

    AV5: =IFERROR(AVERAGEIFS($F5:$AK8,$F5:$AK8,">="&REPLACE(LEFT(AV$2,FIND("-",AV$2)-1),1,FIND(CHAR(10),AV$2),""), $F5:$AK8,"<="&REPLACE(LEFT(AV$2,FIND("s"&CHAR(10),AV$2)-1),1,FIND("-",AV$2),"")),"")

    Now the problem with the formula in AV15. What you have is

    AV15: =IF(ISERROR(AVERAGEIFS($F13:$AK16,$F13:$AK16,">3", $F13:$AK16,"<6")),"",AVERAGEIFS($F13:$AK16,$F13:$AK16,">3",$F13:$AK16,"<6"))

    however, it looks to me that your AVERAGEIFS ranges are referring to the wrong rows. I believe this formula should be

    AV15: =IFERROR(AVERAGEIFS($F15:$AK18,$F15:$AK18,">3",$F15:$AK18,"<6"),"")

    Similarly, your AV40 formula should be

    AV40: =IFERROR(AVERAGEIFS($F40:$AK43,$F40:$AK43,">3",$F40:$AK43,"<6"),"")

  3. #3
    Forum Contributor
    Join Date
    01-25-2013
    Location
    near Philly, PA USA
    MS-Off Ver
    Excel 2019
    Posts
    182

    Re: Average IFs multiple criteria issues

    Hi Hrlngrv,
    Thanks for the assistance.
    Your suggestion for av15 is the right answer to a different question.
    The goal of the formula in av15 is to take the averages in the blue area (Post-treatment) only if their corresponding Pretreatment value (in yellow area) was within the range stated in Av2, Av3, Av 4.
    Can you help with this?

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Average IFs multiple criteria issues

    Wouldn't it be

    Please Login or Register  to view this content.
    or using Harlan's improvements

    Please Login or Register  to view this content.
    Last edited by Bob Phillips; 09-28-2020 at 11:52 AM.

  5. #5
    Forum Contributor
    Join Date
    01-25-2013
    Location
    near Philly, PA USA
    MS-Off Ver
    Excel 2019
    Posts
    182

    Re: Average IFs multiple criteria issues

    Thanks Bob! That did the trick.
    I appreciate your assistance.

+ 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. sum if issues with multiple columns of criteria
    By mandzrose in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-19-2020, 02:59 PM
  2. Index Match Formula with multiple criteria Issues
    By alogia67 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-29-2020, 09:44 AM
  3. Average based on criteria and multiple criteria
    By batchjb69 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-05-2016, 04:30 AM
  4. [SOLVED] Excel formula nested functions max, if, and multiple criteria issues
    By Jack7774 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-19-2016, 04:38 PM
  5. Replies: 1
    Last Post: 02-15-2016, 04:35 PM
  6. Average numbers from multiple columns based on multiple criteria
    By abambi in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-23-2015, 01:52 PM
  7. Replies: 3
    Last Post: 07-02-2012, 06:52 PM

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