+ Reply to Thread
Results 1 to 7 of 7

#DIV/0! error in Average If Array function

  1. #1
    Registered User
    Join Date
    03-28-2007
    Posts
    5

    #DIV/0! error in Average If Array function

    I have this array formula:
    =AVERAGE(IF(Detailed!$O$3:$O$188=Summary!A13,Detailed!$AA$3:$AA$188,"")) where Column O represents months (Jan, Feb, Mar, etc) and column AA represent the Dollar amount that is associated with the month.
    If the month doesn't have the dollar amount, my formula will return #DIV/0! error message. I tried Iserror and if function to remove the error message and not working.
    Please help.
    Thank you very much!

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Try this fix and let me know if it works:

    =AVERAGE(IF((Detailed!$O$3:$O$188=Summary!A13)*(Detailed!$AA$3:$AA$188<>0)*(Detailed!AA$3:$AA$188),""))

    CTRL+SHIFT+ENTER

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try ammending to:

    =AVERAGE(IF(Detailed!$AA$3:$AA$188<>"",IF(Detailed!$O$3:$O$188=Summary!A13,Detailed!$AA$3:$AA$188,"")))

    OR

    =AVERAGE(IF(Detailed!$AA$3:$AA$188>0,IF(Detailed!$O$3:$O$188=Summary!A13,Detailed!$AA$3:$AA$188,""))) If you want to exclude 0 values too.


    Both re-confirmed with Ctrl+Shift+Enter....
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    03-28-2007
    Posts
    5
    Thank you for the quick response, I tried those 3 formulas and none of them works, they keep returning the DIV error,
    Here's the snapshot of my spreadsheet on the Detailed worksheet:
    O AA
    Jan 500
    Jan 125
    Feb 150
    Feb 135.5
    Feb 400
    Feb 500
    Apr 1500
    Apr 25
    Apr 33

    As you can see the month of March is not on the list, that is when I get the DIV error when I try to average the dollar amount by month.
    Thank you.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try

    =IF(ISNUMBER(MATCH(Summary!A13,Detailed!$O$11:$O$188,0)),AVERAGE(IF(Detailed!$O$11:$O$188=Summary!A13,IF(Detailed!$AA$11:$AA$188<>"",Detailed!$AA$11:$AA$188))),"")

    CSE Confirmed

  6. #6
    Registered User
    Join Date
    03-28-2007
    Posts
    5
    THANK YOU VERY MUCH!!! It works.

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by ren1104
    THANK YOU VERY MUCH!!! It works.
    You're welcome.

+ 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