+ Reply to Thread
Results 1 to 4 of 4

#DIV/O! error message, with an AVERAGEIFS in combination with IF AND

  1. #1
    Registered User
    Join Date
    12-10-2010
    Location
    Singapore
    MS-Off Ver
    MS Excel for Mac 2011
    Posts
    51

    #DIV/O! error message, with an AVERAGEIFS in combination with IF AND

    I’m getting an understandable #DIV/O! error message, with an AVERAGEIFS formula. I could easily solve the problem with an IFISERROR addition. The problem however is that I use the AVERAGEIFS formula in combination with IF AND. And everywhere I insert the IFISERROR addition, I get an formula error message.

    The SUMPRODUCT works like a charm:
    =IF(AND($B46="",$C46=""),0,
    IF(AND($B46="",$C46<>0),"not applicable",
    IF(AND($B46<>"",$C46<>""),SUMPRODUCT(($B$4:$B$43=$B46)*($C$4:$C$43=$C46)*G$4:G$43),
    SUMIF($B$4:$B$43,$B46,G$4:G$43))))

    The AVERAGEIFS however doesn’t work
    =IF(AND($B56="",$C56=""),0,
    IF(AND($B56="",$C56<>0),"not applicable",
    IF(AND($B56<>"",$C56<>""),AVERAGEIFS(G$4:G$43,$B$4:$B$43,$B56,$C$4:$C$43,"="&$C56),
    AVERAGEIF($B$4:$B$43,$B56,G$4:G$43))))

    Can anyone help me and guide me where to insert the IFISERROR

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: #DIV/O! error message, with an AVERAGEIFS in combination with IF AND

    The function is IFERROR, not IFISERROR.

    If you want to error-trap any error on the whole thing, then just put it around the whole formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    If you just want to error-trap the AverageIfs and AverageIf parts, then put it there:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Registered User
    Join Date
    12-10-2010
    Location
    Singapore
    MS-Off Ver
    MS Excel for Mac 2011
    Posts
    51

    Re: #DIV/O! error message, with an AVERAGEIFS in combination with IF AND

    Thank you Aardigspook for your education, fast response and excellent solution: it works like a charm!

    With my apologies for my belated response (only just now spotted your immediate response), I wish a wonderful rest of the weekend,
    Gijs

  4. #4
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: #DIV/O! error message, with an AVERAGEIFS in combination with IF AND

    You're welcome - enjoy your weekend too.
    If that's your problem solved, please take a moment to mark the thread as 'Solved' by going to 'Thread Tools' above your first post and selecting 'Mark this Thread as Solved' - thank you.

+ 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 using indexed % #REF! error
    By davidktilley in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-11-2016, 07:58 PM
  2. [SOLVED] Averageifs – error Value
    By pauldaddyadams in forum Excel General
    Replies: 3
    Last Post: 02-05-2016, 11:40 AM
  3. [SOLVED] Value error on Averageifs
    By leem in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-08-2015, 02:55 PM
  4. Averageifs(offset(),..) error help
    By mariosmk555 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-05-2014, 01:35 PM
  5. DIV/0 error with AVERAGEIFS
    By pcp2010 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-13-2013, 10:01 AM
  6. Delete This Posting Please
    By dsannito in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-25-2013, 10:34 AM
  7. AverageIFS with Div/0 error
    By Nemoren in forum Excel General
    Replies: 13
    Last Post: 05-03-2012, 09:33 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