close

I just want to do a simple sum and if the sum returns a negative number, I
want to change it to 0.
C6 = 38, D14 = 2, H6 = 43
=(C6 D14)-H6

result is -3 but I want it to show 0

Try this:

=MAX((C6 D14)-H6,0)

HTH,
Elkar

quot;Rustyquot; wrote:

gt; I just want to do a simple sum and if the sum returns a negative number, I
gt; want to change it to 0.
gt; C6 = 38, D14 = 2, H6 = 43
gt; =(C6 D14)-H6
gt;
gt; result is -3 but I want it to show 0

Fixed. Thanks Elkar

quot;Elkarquot; wrote:

gt; Try this:
gt;
gt; =MAX((C6 D14)-H6,0)
gt;
gt; HTH,
gt; Elkar
gt;
gt; quot;Rustyquot; wrote:
gt;
gt; gt; I just want to do a simple sum and if the sum returns a negative number, I
gt; gt; want to change it to 0.
gt; gt; C6 = 38, D14 = 2, H6 = 43
gt; gt; =(C6 D14)-H6
gt; gt;
gt; gt; result is -3 but I want it to show 0

One way:

=MAX(C6 D14-H6,0)

In article gt;,
quot;Rustyquot; gt; wrote:

gt; I just want to do a simple sum and if the sum returns a negative number, I
gt; want to change it to 0.
gt; C6 = 38, D14 = 2, H6 = 43
gt; =(C6 D14)-H6
gt;
gt; result is -3 but I want it to show 0

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()