+ 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
    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))
    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
    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.

  3. #3
    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?

  4. #4
    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.

  5. #5
    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.

  6. #6
    Registered User
    Join Date
    10-03-2007
    Posts
    31
    I am sorry for being confusing. I'm just trying to get this to come out looking good and functional.

    I have your formula:
    =IF(COUNT(B3:B14)=12,NA(),ROUNDUP(AVERAGE(B3:B14),0))
    And mine:
    =IF(COUNTIF(B3:B14,""),"N/A",ROUNDUP(AVERAGE(B3:B14),0))
    Both work different. Yours works properly to calculate the AVERAGE, but when there is no values in the "Usage" column the cell displays #DIV/0! (I looked into this and it's because Excel is reading that it is dividing my a denomenator of 0).

    Mine does what I would like it to when there is no values in the "Usage" column by displaying N/A, but will not calculate the AVERAGE(B3:B14).

    Also remember that when all 12 month's values are known, I need this cell to show N/A again.

    Thanks again!

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

    =IF(OR(COUNT(B3:B14)=12,COUNTBLANK(B3:B14)=12),NA(),ROUNDUP(AVERAGE(B3:B14),0))

+ 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