+ Reply to Thread
Results 1 to 4 of 4

how can i do this?

  1. #1
    Registered User
    Join Date
    03-10-2006
    Posts
    48

    Question how can i do this?

    here we go,

    what i would like to do is take the value in g20 and m20 add them together and take the average..BUT... if m20 equals #DIV/0! i still want g20 to calculate..

    ie- g20= 30 and M20= 30 then C20=30, this is good
    ie- g20= 30 and M20= #DIV/0! then C20=30, this is good

    But what i am getting is,

    G20= 30 and M20= #DIV/0! then C20=15, this is not good

    any suggestions?

  2. #2
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Try this.

    =IF(ISERROR(M20),G20,AVERAGE(G20,M20))


    Does that help?

    Steve

  3. #3
    Registered User
    Join Date
    04-23-2004
    Posts
    28
    Quote Originally Posted by fivermsg
    here we go,

    what i would like to do is take the value in g20 and m20 add them together and take the average..BUT... if m20 equals #DIV/0! i still want g20 to calculate..

    ie- g20= 30 and M20= 30 then C20=30, this is good
    ie- g20= 30 and M20= #DIV/0! then C20=30, this is good

    But what i am getting is,

    G20= 30 and M20= #DIV/0! then C20=15, this is not good

    any suggestions?
    May be you should check is it number or not. Something like this:
    =IF(AND(ISNUMBER(A13),ISNUMBER(B13)),AVERAGE(A13:B13),"")

  4. #4
    Dave O
    Guest

    Re: how can i do this?

    Use the start of the formula from the previous post, and divide by the
    count of numeric cells to get the simple average, comme ca:
    =(IF(ISNUMBER(G20),G20)+IF(ISNUMBER(M20),M20))/COUNT(G20,M20)


+ 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