Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / March 2007

Tip: Looking for answers? Try searching our database.

don't go less then 0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ivano - 08 Mar 2007 20:25 GMT
Hi,
I have a cel that does some calculation and I don't want the value to go
below zero.  The formula in cell A1 is =IF(B1=0, A2-B2,A3-B3) so if either A2
or A3 is less in value then B2 or B3 then the result of the formula is a
negative number. How can I do it so the value will not go below 0?

Thanks,
bj - 08 Mar 2007 20:36 GMT
try
=max(0,IF(B1=0, A2-B2,A3-B3))

> Hi,
> I have a cel that does some calculation and I don't want the value to go
[quoted text clipped - 3 lines]
>
> Thanks,
Mike - 08 Mar 2007 20:58 GMT
Try

=IF(B1=0, IF(A2-B2>0,A2-B2,0),IF(A3-B3>0,A3-B3,0))

Mike

> Hi,
> I have a cel that does some calculation and I don't want the value to go
[quoted text clipped - 3 lines]
>
> Thanks,
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.