+ Reply to Thread
Results 1 to 9 of 9

Aggregate with Average VS IF & ISERROR help

  1. #1
    Forum Contributor
    Join Date
    02-13-2018
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    179

    Aggregate with Average VS IF & ISERROR help

    when I drag this formula down
    Please Login or Register  to view this content.
    I get this results. Why is the aggregate not picking up the #VALUE!?

    aggregate.PNG

    vs using a IF statement and having to add in a ISERROR

    Please Login or Register  to view this content.
    iserror.PNG

    I would like to nest that
    Please Login or Register  to view this content.

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Aggregate with Average VS IF & ISERROR help

    I'm not seeing a #VALUE! error in the data, so there's no error for the AGGREGATE to pick up in the first place?

    Can you attach an example spreadsheet instead of posting pix?
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Aggregate with Average VS IF & ISERROR help

    Agreed.

    This goes much faster with an actual workbook uploaded ... saves retyping data and guessing.

    To attach a file to your post,
    • be sure to desensitize the data
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”

    The file name will appear at the bottom of your reply.
    Dave

  4. #4
    Forum Contributor
    Join Date
    02-13-2018
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    179

    Re: Aggregate with Average VS IF & ISERROR help

    Hi @FlameRetired & ben_hensel ,

    I attached a sample workbook for you both. Thank you
    Attached Files Attached Files

  5. #5
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Aggregate with Average VS IF & ISERROR help

    I suppose you want this.

    Try this in S4 and copy down

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    02-13-2018
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    179

    Re: Aggregate with Average VS IF & ISERROR help

    Hi Jose,

    thanks for the response. I was wondering if there was a way to use the Aggregate-Average-ignore errors- instead of the IFERROR function?

  7. #7
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Aggregate with Average VS IF & ISERROR help

    It looks like you're trying to feed AGGREGATE information for an AVERAGEIF, but it doesn't have that functionality.

    Let's look at how it's interpreting the function:
    Please Login or Register  to view this content.
    AGG inputs This is telling it to use "Function 1" (which is average) and "Option 6" (which is "ignore errors").
    First Range this is the first range input.
    Second Range This is second range input, not a logical condition for AVERAGEIF.

    So it's assessing the range as {L6:N6, "<>0"} like that, as a 3-cells range of numbers plus another value, a text string. So rather than a conditional, you are feeding it a text string as the fourth input, which freaks it out (because you're ordering it to do math with text) and results in throwing a #VALUE! error.

    (Also, BTW, using AGGREGATE / SUBTOTAL on horizontal ranges is not recommended, because they definitely won't handle hidden rows correctly, and could screw up in other ways too).

    Try this instead:
    Please Login or Register  to view this content.
    Rather than wrapping with an IFERROR as an ugly brute force solution, use the COUNTIF function to prevent the AVERAGEIF from running in the case where you would get the #DIV/0! problem.

  8. #8
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Aggregate with Average VS IF & ISERROR help

    Hi @Shruder

    The aggregate function do not work in that way.

    If your data has a error (eg. L4:N4 has no error) the option 6 say to function mean to ignore them

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    is correct but
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    is not correct

  9. #9
    Forum Contributor
    Join Date
    02-13-2018
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    179

    Re: Aggregate with Average VS IF & ISERROR help

    Hi Ben & Jose,

    thank you for your explanations on why the Aggregate is not the best solution. You are both right and I am utilizing the IF(AND(COUNT(AVERAGEIF

    I had initially used the COUNTIF <> 0 to get the numbers, then was trying to using the Average Aggregate based off that. But as you both have pointed out, that will not take care of the averages that have a "0".

    The formula
    Please Login or Register  to view this content.
    does however work and I will use that.

    thank you both for your valuable input.

+ 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. Aggregate by ID in DAX
    By JB_100 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-22-2017, 02:35 AM
  2. copying an aggregate average function down multiple rows
    By sarah.grady in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-24-2012, 11:49 AM
  3. Replies: 1
    Last Post: 12-15-2011, 08:43 PM
  4. Combining Average excluding 0 with ISERROR function
    By olga6542 in forum Excel General
    Replies: 18
    Last Post: 06-17-2010, 06:11 PM
  5. Combining Average excluding 0 with ISERROR function
    By olga6542 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-17-2010, 11:30 AM
  6. How to Use IsError input if IsError=false
    By izpinoza in forum Excel General
    Replies: 1
    Last Post: 10-14-2009, 05:02 AM
  7. Best way to aggregate?
    By gnome_core in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-03-2009, 04:38 PM

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