Calculate value for postive numbers only

chally3

Board Regular
Joined
Mar 22, 2006
Messages
157
Hi everyone,

Can anyone point me in the direction of where I am going wrong. I am trying to sum 2 cells , but only if positive number. This seems easy enough but I cannot get the formula to work.

Column D = Qty on hand
Column P = Cost
Column T = free stock qty (Which can be a negative value)

What I am trying to do is calculate values in rows :ie D2*P2 if T2 is more than "0"

If have tried -SUMIF(D2*P2,">0") but this is not working.


Thank you in advance
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Can anyone point me in the direction of where I am going wrong. I am trying to sum 2 cells , but only if positive number. This seems easy enough but I cannot get the formula to work.

Column D = Qty on hand
Column P = Cost
Column T = free stock qty (Which can be a negative value)

What I am trying to do is calculate values in rows :ie D2*P2 if T2 is more than "0"

If have tried -SUMIF(D2*P2,">0") but this is not working.
The first argument to the SUMIF function must be a range... you have a multiplication of values there. However, you formula wouldn't work correctly even if you could use a multiplication because it is not dependent on cell T2. I think this more straightforward formula will do what you want...

=IF(T2>0,D2*P2,0)
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top