ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   make a minus a zero (https://www.excelbanter.com/excel-discussion-misc-queries/249094-make-minus-zero.html)

James

make a minus a zero
 
How can I turn a minus result into a zero.

For example....

Column A = Stock Levels Needed /50
Column B = Actual Stock Levels /60
Column C = Plan to produce (A-B) /-10
Column D = Predicted Sales
Column E = Actual Sales /30
Column F = Predicted Stock (B+C-E) /20

If coulmn C returns a minus value then Column F returns an incorrect value.
The numbers after the / reflect the numbers my formulae returns. Where in
actual fact Column F should read 30 as there is 60 on stock, I only need to
keep 50 so I don't need to make any. I've sold 30 so I should have 30 left.
But because Column C is a minus value it takes that off too. If the result
of Column C is a positive value then it works fine.

Hope I've explained this good enough.
Thanks in advance.

Bill Kuunders

make a minus a zero
 
In C change the formula to =IF(B2A2,0,A2-B2)
and extend it down.

Greetings from New Zealand
"James" wrote in message
...
How can I turn a minus result into a zero.

For example....

Column A = Stock Levels Needed /50
Column B = Actual Stock Levels /60
Column C = Plan to produce (A-B) /-10
Column D = Predicted Sales
Column E = Actual Sales /30
Column F = Predicted Stock (B+C-E) /20

If coulmn C returns a minus value then Column F returns an incorrect
value.
The numbers after the / reflect the numbers my formulae returns. Where in
actual fact Column F should read 30 as there is 60 on stock, I only need
to
keep 50 so I don't need to make any. I've sold 30 so I should have 30
left.
But because Column C is a minus value it takes that off too. If the
result
of Column C is a positive value then it works fine.

Hope I've explained this good enough.
Thanks in advance.




Joe User[_2_]

make a minus a zero
 
"James" wrote:
How can I turn a minus result into a zero.
[....]
Column C = Plan to produce (A-B) /-10


The formula in column C should be of the form:

=MAX(0, A1-B1)


----- original message -----

"James" wrote in message
...
How can I turn a minus result into a zero.

For example....

Column A = Stock Levels Needed /50
Column B = Actual Stock Levels /60
Column C = Plan to produce (A-B) /-10
Column D = Predicted Sales
Column E = Actual Sales /30
Column F = Predicted Stock (B+C-E) /20

If coulmn C returns a minus value then Column F returns an incorrect
value.
The numbers after the / reflect the numbers my formulae returns. Where in
actual fact Column F should read 30 as there is 60 on stock, I only need
to
keep 50 so I don't need to make any. I've sold 30 so I should have 30
left.
But because Column C is a minus value it takes that off too. If the
result
of Column C is a positive value then it works fine.

Hope I've explained this good enough.
Thanks in advance.




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

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