ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Problem with IF function/circular/HELP! (https://www.excelbanter.com/excel-worksheet-functions/43305-problem-if-function-circular-help.html)

smdettloff

Problem with IF function/circular/HELP!
 

What I want to do seems so simple but it's the only formula on this
spreedsheet I can't figure out. I've spent all day on it and it's
driving me nuts! Here it is:

I want (cells not named so I'm using cell id's): D5-G5. If the result
is less than or equal to 0 (in other words, if it's a negative number),
then I want the field to say 0. If the answer is greater than 0 (in
other words a positive number), then I want the field to give the
result of D5-G5. (the cell where the result is in is H5)

I've tried it a few different ways and it never works out. Once I got
a circular error?

PLEASE HELP!


--
smdettloff
------------------------------------------------------------------------
smdettloff's Profile: http://www.excelforum.com/member.php...o&userid=26839
View this thread: http://www.excelforum.com/showthread...hreadid=400846


pdberger

smdettloff --

How about

=max(0,d5-g5)



"smdettloff" wrote:


What I want to do seems so simple but it's the only formula on this
spreedsheet I can't figure out. I've spent all day on it and it's
driving me nuts! Here it is:

I want (cells not named so I'm using cell id's): D5-G5. If the result
is less than or equal to 0 (in other words, if it's a negative number),
then I want the field to say 0. If the answer is greater than 0 (in
other words a positive number), then I want the field to give the
result of D5-G5. (the cell where the result is in is H5)

I've tried it a few different ways and it never works out. Once I got
a circular error?

PLEASE HELP!


--
smdettloff
------------------------------------------------------------------------
smdettloff's Profile: http://www.excelforum.com/member.php...o&userid=26839
View this thread: http://www.excelforum.com/showthread...hreadid=400846



Cutter


Type this in H5:

IF(D5-G5<0,0,D5-G5)


--
Cutter
------------------------------------------------------------------------
Cutter's Profile: http://www.excelforum.com/member.php...fo&userid=9848
View this thread: http://www.excelforum.com/showthread...hreadid=400846


smdettloff


Unfortunately it's still not working. I put the formula in H5 and put
small numbers in D5 and G5 just to test it but I'm getting a result of
0 when I should be getting 5.00. I've tried to attach a screen shot.


+-------------------------------------------------------------------+
|Filename: CaptureWiz007.jpg |
|Download: http://www.excelforum.com/attachment.php?postid=3769 |
+-------------------------------------------------------------------+

--
smdettloff
------------------------------------------------------------------------
smdettloff's Profile: http://www.excelforum.com/member.php...o&userid=26839
View this thread: http://www.excelforum.com/showthread...hreadid=400846


RagDyer

If D5 is smaller then G5, then you should get a zero,
Which is *exactly* what you got.

Your formula is working correctly!

You just have to get your mind around your own formula.

=If(D5-G5<0,0,D5-G5)

D5 = 5
G5 = 10
5 - 10 = -5 Which is *less* then 0
Makes the first argument TRUE, so the return is 0.

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"smdettloff" wrote
in message ...

Unfortunately it's still not working. I put the formula in H5 and put
small numbers in D5 and G5 just to test it but I'm getting a result of
0 when I should be getting 5.00. I've tried to attach a screen shot.


+-------------------------------------------------------------------+
|Filename: CaptureWiz007.jpg |
|Download: http://www.excelforum.com/attachment.php?postid=3769 |
+-------------------------------------------------------------------+

--
smdettloff
------------------------------------------------------------------------
smdettloff's Profile:

http://www.excelforum.com/member.php...o&userid=26839
View this thread: http://www.excelforum.com/showthread...hreadid=400846




All times are GMT +1. The time now is 11:12 PM.

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