ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   an if question (https://www.excelbanter.com/excel-discussion-misc-queries/77021-if-question.html)

jwfakouri

an if question
 

hey guy's
A1 = 500-400, but if A1 equals a negative then i need A1 to equal
0.
please help.

thanks,
jason


--
jwfakouri
------------------------------------------------------------------------
jwfakouri's Profile: http://www.excelforum.com/member.php...o&userid=31435
View this thread: http://www.excelforum.com/showthread...hreadid=521982


Ron Coderre

an if question
 

Try this:

A1: =MAX(500-400,0)

Does that give you something to work with?

Regards,
Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=521982


Fred Smith

an if question
 
There's no formula which would set A1 to 0 if it was negative. You could do this
with a macro, but I doubt you need to go to this much trouble. Your likely best
bets a

1. If there currently is a formula in A1, then change it to an IF statement, as
in:

=if(b1-c1<0,0,b1-c1)

2. If you have other formulas referring to A1, have them test for a negative
value first.

--
Regards,
Fred


"jwfakouri" wrote in
message ...

hey guy's
A1 = 500-400, but if A1 equals a negative then i need A1 to equal
0.
please help.

thanks,
jason


--
jwfakouri
------------------------------------------------------------------------
jwfakouri's Profile:
http://www.excelforum.com/member.php...o&userid=31435
View this thread: http://www.excelforum.com/showthread...hreadid=521982




tjtjjtjt

an if question
 
=MAX(500-400,0)
--
tj


"jwfakouri" wrote:


hey guy's
A1 = 500-400, but if A1 equals a negative then i need A1 to equal
0.
please help.

thanks,
jason


--
jwfakouri
------------------------------------------------------------------------
jwfakouri's Profile: http://www.excelforum.com/member.php...o&userid=31435
View this thread: http://www.excelforum.com/showthread...hreadid=521982




All times are GMT +1. The time now is 05:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com