ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change Negative Numbers to 0 (https://www.excelbanter.com/excel-programming/400599-change-negative-numbers-0-a.html)

Sherry N.

Change Negative Numbers to 0
 
I have a cell that calculates how many business days between two dates
=NETWORKDAYS(B3,C1).

If that formula produces a negative number I would like the value of the
cell to be 0 "zero".

Any suggestions?
--
Sherry N.

Chip Pearson

Change Negative Numbers to 0
 
Sherry,

Try

=MAX(0,NETWORKDAYS(B3,C1))


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"Sherry N." wrote in message
...
I have a cell that calculates how many business days between two dates
=NETWORKDAYS(B3,C1).

If that formula produces a negative number I would like the value of the
cell to be 0 "zero".

Any suggestions?
--
Sherry N.



Sherry N.

Change Negative Numbers to 0
 
Perfect! Thanks so much!
--
Sherry N.


"Chip Pearson" wrote:

Sherry,

Try

=MAX(0,NETWORKDAYS(B3,C1))


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"Sherry N." wrote in message
...
I have a cell that calculates how many business days between two dates
=NETWORKDAYS(B3,C1).

If that formula produces a negative number I would like the value of the
cell to be 0 "zero".

Any suggestions?
--
Sherry N.



Tom Ogilvy

Change Negative Numbers to 0
 
=max(NETWORKDAYS(B3,C1),0)

--
Regards,
Tom Ogilvy



"Sherry N." wrote:

I have a cell that calculates how many business days between two dates
=NETWORKDAYS(B3,C1).

If that formula produces a negative number I would like the value of the
cell to be 0 "zero".

Any suggestions?
--
Sherry N.


Dave D-C[_3_]

Change Negative Numbers to 0
 
How about
=IF(NETWORKDAYS(B3,C1)<0,0,NETWORKDAYS(B3,C1))
D-C

Sherry wrote:
I have a cell that calculates how many business days between two dates
=NETWORKDAYS(B3,C1).
If that formula produces a negative number I would like the value of the
cell to be 0 "zero".
Any suggestions?



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----

Chip Pearson

Change Negative Numbers to 0
 
=IF(NETWORKDAYS(B3,C1)<0,0,NETWORKDAYS(B3,C1))

In most cases, that would call NETWORKDAYS twice, adding unnecessary
overhead to the calculations.




"Dave D-C" wrote in message
...
How about
=IF(NETWORKDAYS(B3,C1)<0,0,NETWORKDAYS(B3,C1))
D-C

Sherry wrote:
I have a cell that calculates how many business days between two dates
=NETWORKDAYS(B3,C1).
If that formula produces a negative number I would like the value of the
cell to be 0 "zero".
Any suggestions?



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet
News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+
Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption
=----




All times are GMT +1. The time now is 05:32 PM.

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