+ Reply to Thread
Results 1 to 20 of 20

Combine Two Formulas

Hybrid View

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

    but if I take you literally...then I come up with this:

    =IF(COUNTIF(B3:B14,">0"),IF(ISNA(B17),AVERAGE(B3:B14),NA()),0)

    is this what you need?
    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.

  2. #2
    Registered User
    Join Date
    10-03-2007
    Posts
    31
    Having the same problem with that formula as I was mine.

    It gives me N/A preceded with a # sign (not sure why), but is still will not calculate the AVERAGE when all the values are not available.

    Here is the file so you can see what I have so far.

    Thank you again for the help!
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-17-2004
    Posts
    14

    Try These

    So I didn't know if you only wanted the average of the months with values or the months with the zero months included. So if you want an average of just the months available, try.

    =IF(COUNTIF(B3:B14,">0")=12,"N/A",ROUNDUP(SUM(B3:B14)/COUNTIF(B3:B14,">0"),0))

    If you want the monthly average including the 0 months try:

    =IF(COUNTIF(B3:B14,">0")=12,"N/A",ROUNDUP(AVERAGE(B3:B14),0))

  4. #4
    Registered User
    Join Date
    10-03-2007
    Posts
    31
    Quote Originally Posted by JRock
    If you want the monthly average including the 0 months try:

    =IF(COUNTIF(B3:B14,">0")=12,"N/A",ROUNDUP(AVERAGE(B3:B14),0))
    Exactly what I needed. THANK YOU!

  5. #5
    Registered User
    Join Date
    10-03-2007
    Posts
    31
    ..........
    Attached Files Attached Files

  6. #6
    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 SOMLSS1
    Having the same problem with that formula as I was mine.

    It gives me N/A preceded with a # sign (not sure why), but is still will not calculate the AVERAGE when all the values are not available.

    Here is the file so you can see what I have so far.

    Thank you again for the help!
    Try also:
    =IF(COUNT(B3:B14)=12,NA(),ROUNDUP(AVERAGE(B3:B14),0))

  7. #7
    Registered User
    Join Date
    10-03-2007
    Posts
    31
    I can't believe I'm still stuck on this!

    I have modified the formula to:
    =IF(COUNTIF(B3:B14,""),"N/A",ROUNDUP(AVERAGE(B3:B14),0))
    Which does what I need it to with N/A but will not AVERAGE(B3:B14) unless all 12 month values are there. I need it to calculate if 1-11 are there but not the 12th value.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    How is this different than my last suggested formula?

  9. #9
    Registered User
    Join Date
    10-03-2007
    Posts
    31
    Instead of the cell reading #DIV/0! when there are no values set for "Usage" it reads N/A (not available), like I need it to.

    But your formula calculate the AVERAGE like it's supposed as mine wont.

  10. #10
    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 SOMLSS1
    Instead of the cell reading #DIV/0! when there are no values set for "Usage" it reads N/A (not available), like I need it to.

    But your formula calculate the AVERAGE like it's supposed as mine wont.


    So do we have a solution or not?

    I'm not following.

+ 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