+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Averageifs Div/0 error when all all cells in numerator range are NA

  1. #1
    Registered User
    Join Date
    04-16-2012
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2007
    Posts
    18

    Averageifs Div/0 error when all all cells in numerator range are NA

    All cells in the Column Z are NA. The following formula returns a div/0 error.

    =AVERAGEIFS('Days Between'!$Z$5:$Z$3100,'Days Between'!$I$5:$I$3100,">=12/01/2011",'Days Between'!$I$5:$I$3100,"<=12/31/2011")

    I changed it to an if formula to account for the NA's and it also returned a div/0 error.

    =IF('Days Between'!Z5:Z3100<>"NA","NA",AVERAGEIFS('Days Between'!$Z$5:$Z$3100,'Days Between'!$I$5:$I$3100,">=12/01/2011",'Days Between'!$I$5:$I$3100,"<=12/31/2011"))

    I want a formula to return NA if all the cells in the range are NA or to average the numbers if some or all of the cells contain numbers.

    Help!

    Catherine

  2. #2
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Averageifs Div/0 error when all all cells in numerator range are NA

    If all cells in Z equals "NA" then you will always get a div/0 error, since you are averaging nothing. You could wrap your first average formula in =IFERROR("your formula","NA").
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  3. #3
    Registered User
    Join Date
    04-16-2012
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Averageifs Div/0 error when all all cells in numerator range are NA

    That works; thanks a million!

  4. #4
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Averageifs Div/0 error when all all cells in numerator range are NA

    You are most welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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