+ Reply to Thread
Results 1 to 3 of 3

sum numbers only when a named cell is not zero

  1. #1
    Cheryl McHarg
    Guest

    sum numbers only when a named cell is not zero

    In my spreadsheet, I need cell L10 to sum cells ( M10-P10) if P10 does not
    equal zero. P10 is a formula=+n10+O10.

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Cheryl,

    try

    =if($P$10<>0,sum(M10:P10),"")

    or

    =if($P$10<>0,sum(M10:P10),0)

    to reflect a zero.


    Quote Originally Posted by Cheryl McHarg
    In my spreadsheet, I need cell L10 to sum cells ( M10-P10) if P10 does not
    equal zero. P10 is a formula=+n10+O10.

  3. #3
    JE McGimpsey
    Guest

    Re: sum numbers only when a named cell is not zero

    One way:

    =IF(P10<>0,SUM(M10:P10),"")

    Given P10's formula, it could also be

    =IF(P10<>0, 2*P10+M10,"")

    or, if you want to return 0 instead of a null string:

    =(P10<>0)*(2*P10+M10)


    Note that the first "+" in your formula is superfluous.

    In article <[email protected]>,
    "Cheryl McHarg" <Cheryl [email protected]> wrote:

    > In my spreadsheet, I need cell L10 to sum cells ( M10-P10) if P10 does not
    > equal zero. P10 is a formula=+n10+O10.


+ 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