close

=IF(AND(G6=0,O6=0),P6,IF(G6=0,O6,G6-N6))

The above formula is in cell Q6 the results is a negative number. example
-2. I want to add to this formula above that if the results is less than Zero
than give me Zero.

Any help!

B.

You can use the MAX function make it only give you 0 and higher as
follows:

=MAX ( ##, 0)

thus:
=MAX(IF(AND(G6=0,O6=0),P6,IF(G6=0,O6,G6-N6)),0)
BSantos wrote:
gt; =IF(AND(G6=0,O6=0),P6,IF(G6=0,O6,G6-N6))
gt;
gt; The above formula is in cell Q6 the results is a negative number. example
gt; -2. I want to add to this formula above that if the results is less than Zero
gt; than give me Zero.
gt;
gt; Any help!
gt;
gt; B.Assuming that you mean G6-N6 is negative try:

=IF(AND(G6=0,O6=0),P6,IF(G6=0,O6,MAX(0,G6-N6)))--
HTH

Sandy
with @tiscali.co.ukquot;BSantosquot; gt; wrote in message
...
gt; =IF(AND(G6=0,O6=0),P6,IF(G6=0,O6,G6-N6))
gt;
gt; The above formula is in cell Q6 the results is a negative number. example
gt; -2. I want to add to this formula above that if the results is less than
gt; Zero
gt; than give me Zero.
gt;
gt; Any help!
gt;
gt; B.

try this formula

=MAX(0,IF(G6,G6-N6,IF(O6,O6,P6))--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: www.excelforum.com/member.php...oamp;userid=30486
View this thread: www.excelforum.com/showthread...hreadid=502284Sandy, could you help me with this one:

=IF($I$2=quot;Activequot;,VLOOKUP($E6,Data!$G$4:$AT$1587,2 8,0),quot;0quot;)

I have this formula above in a cell. I want to add that if the vlookup
doesn't find anything and returns a #N/A than give me ZERO.

I'm doing this so I don't get #n/a in the column and my totals will add up
without giving me #n/a.

quot;Sandy Mannquot; wrote:

gt; Assuming that you mean G6-N6 is negative try:
gt;
gt; =IF(AND(G6=0,O6=0),P6,IF(G6=0,O6,MAX(0,G6-N6)))
gt;
gt;
gt; --
gt; HTH
gt;
gt; Sandy
gt;
gt; with @tiscali.co.uk
gt;
gt;
gt; quot;BSantosquot; gt; wrote in message
gt; ...
gt; gt; =IF(AND(G6=0,O6=0),P6,IF(G6=0,O6,G6-N6))
gt; gt;
gt; gt; The above formula is in cell Q6 the results is a negative number. example
gt; gt; -2. I want to add to this formula above that if the results is less than
gt; gt; Zero
gt; gt; than give me Zero.
gt; gt;
gt; gt; Any help!
gt; gt;
gt; gt; B.
gt;
gt;
gt;


You can do it this way

=IF(OR($I$2=quot;Activequot;,ISNA(VLOOKUP($E6,Data!$G$4:$A T$1587,28,0))),0,VLOOKUP($E6,Data!$G$4:$AT$1587,28 ,0))--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: www.excelforum.com/member.php...oamp;userid=30486
View this thread: www.excelforum.com/showthread...hreadid=502284

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

software

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