ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   I need to add something onto the formula...Can anyone help? (https://www.excelbanter.com/excel-worksheet-functions/243692-i-need-add-something-onto-formula-can-anyone-help.html)

Nicole

I need to add something onto the formula...Can anyone help?
 
=SUM(S5:X5)+IF(Q5<R5,R5-Q5,0)+IF(R5<Q5,R5-Q5,0)

I want to add if total is <=0 then =0

joeu2004

I need to add something onto the formula...Can anyone help?
 
"Nicole" wrote:
=SUM(S5:X5)+IF(Q5<R5,R5-Q5,0)+IF(R5<Q5,R5-Q5,0)
I want to add if total is <=0 then =0


=MAX(0, SUM(S5:X5)+IF(Q5<R5,R5-Q5,0)+IF(R5<Q5,R5-Q5,0) )

But your two IF() expressions seem odd. Together, they say compute R5-Q5 if
R5 does not equal Q5, otherwise compute zero. But that is exactly what
R5-Q5 does.

I wonder if you want IF(Q5<R5,R5-Q5,0)+IF(R5<Q5,Q5-R5,0). But that is the
same as ABS(Q5-R5).


Nicole

I need to add something onto the formula...Can anyone help?
 
Hi Joe,

I had some help from my supervisor and I have done part of the formula. What
I am doing is I have -

Stock on Hand, Min.Stock in Warehouse, Stock on order.

Therefore I want a formula to add together the stock on order, taking into
account the min. stock we want and what we already have made. Then if there
is nothing on order but we have more than the stock on had to not put in a
negative number but just stay =0. Can you tell me what you would use? If this
doesn't make sense, I am Happy to email an example.

Thank you for helping :) Kind Regards,

Nicole

"JoeU2004" wrote:

"Nicole" wrote:
=SUM(S5:X5)+IF(Q5<R5,R5-Q5,0)+IF(R5<Q5,R5-Q5,0)
I want to add if total is <=0 then =0


=MAX(0, SUM(S5:X5)+IF(Q5<R5,R5-Q5,0)+IF(R5<Q5,R5-Q5,0) )

But your two IF() expressions seem odd. Together, they say compute R5-Q5 if
R5 does not equal Q5, otherwise compute zero. But that is exactly what
R5-Q5 does.

I wonder if you want IF(Q5<R5,R5-Q5,0)+IF(R5<Q5,Q5-R5,0). But that is the
same as ABS(Q5-R5).



joeu2004

I need to add something onto the formula...Can anyone help?
 
"Nicole" wrote:
What I am doing is I have -
Stock on Hand, Min.Stock in Warehouse, Stock on order.

I want a formula to add together the stock on order, taking into
account the min. stock we want and what we already have made.


I think you are saying that you want to determine stockOnOrder. If
minStockInWarehouse is more than stockOnHand, you want stockOnOrder to be
the additional amount that you need to order. Right?

If I understand that correctly, stockOnOrder is computed by:

MAX(0, minStockInWarehouse - stockOnHand)

If that does not answer your question, feel to send an Excel file (Excel
2003 or earlier) to joeu2004 "at" hotmail.com. In the text of the email,
please let me know what to look at in the Excel file.


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

"Nicole" wrote in message
...
Hi Joe,

I had some help from my supervisor and I have done part of the formula.
What
I am doing is I have -

Stock on Hand, Min.Stock in Warehouse, Stock on order.

Therefore I want a formula to add together the stock on order, taking into
account the min. stock we want and what we already have made. Then if
there
is nothing on order but we have more than the stock on had to not put in a
negative number but just stay =0. Can you tell me what you would use? If
this
doesn't make sense, I am Happy to email an example.

Thank you for helping :) Kind Regards,

Nicole

"JoeU2004" wrote:

"Nicole" wrote:
=SUM(S5:X5)+IF(Q5<R5,R5-Q5,0)+IF(R5<Q5,R5-Q5,0)
I want to add if total is <=0 then =0


=MAX(0, SUM(S5:X5)+IF(Q5<R5,R5-Q5,0)+IF(R5<Q5,R5-Q5,0) )

But your two IF() expressions seem odd. Together, they say compute R5-Q5
if
R5 does not equal Q5, otherwise compute zero. But that is exactly what
R5-Q5 does.

I wonder if you want IF(Q5<R5,R5-Q5,0)+IF(R5<Q5,Q5-R5,0). But that is
the
same as ABS(Q5-R5).




Nicole

I need to add something onto the formula...Can anyone help?
 
Hi Joe,

Thank you very much for your help, The formula I have used is:

=MAX(0,SUM(S7:X7)+IF(Q7<R7,R7-Q7,0)+IF(R7<Q7,R7-Q7,0)) =9
Without the "if" part, it doesn't take into account the different stock
levels somehow.

SOH Min Stock Stock on order
Stock to be made
26 25 10 9


I apprecitate your help :)
Nicole


"JoeU2004" wrote:

"Nicole" wrote:
What I am doing is I have -
Stock on Hand, Min.Stock in Warehouse, Stock on order.

I want a formula to add together the stock on order, taking into
account the min. stock we want and what we already have made.


I think you are saying that you want to determine stockOnOrder. If
minStockInWarehouse is more than stockOnHand, you want stockOnOrder to be
the additional amount that you need to order. Right?

If I understand that correctly, stockOnOrder is computed by:

MAX(0, minStockInWarehouse - stockOnHand)

If that does not answer your question, feel to send an Excel file (Excel
2003 or earlier) to joeu2004 "at" hotmail.com. In the text of the email,
please let me know what to look at in the Excel file.


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

"Nicole" wrote in message
...
Hi Joe,

I had some help from my supervisor and I have done part of the formula.
What
I am doing is I have -

Stock on Hand, Min.Stock in Warehouse, Stock on order.

Therefore I want a formula to add together the stock on order, taking into
account the min. stock we want and what we already have made. Then if
there
is nothing on order but we have more than the stock on had to not put in a
negative number but just stay =0. Can you tell me what you would use? If
this
doesn't make sense, I am Happy to email an example.

Thank you for helping :) Kind Regards,

Nicole

"JoeU2004" wrote:

"Nicole" wrote:
=SUM(S5:X5)+IF(Q5<R5,R5-Q5,0)+IF(R5<Q5,R5-Q5,0)
I want to add if total is <=0 then =0

=MAX(0, SUM(S5:X5)+IF(Q5<R5,R5-Q5,0)+IF(R5<Q5,R5-Q5,0) )

But your two IF() expressions seem odd. Together, they say compute R5-Q5
if
R5 does not equal Q5, otherwise compute zero. But that is exactly what
R5-Q5 does.

I wonder if you want IF(Q5<R5,R5-Q5,0)+IF(R5<Q5,Q5-R5,0). But that is
the
same as ABS(Q5-R5).






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

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