Using =sumif to add up just the positive numbers and ignore minus???

smerrick

Active Member
Joined
Feb 10, 2009
Messages
255
Hello,

I need to use formulas such as =sumif but was wondering if this could be amended so that when I add a column it will only take into account positive numbers and not the negatives? Failing that, would there be an alternative way to quickly do this?

Many Thanks
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Thanks for that. Just to expand on this, say that I needed to lookup product codes. Column A would have the product code, column B the quantity of which some would be negative. What I am trying to do is to use the sumif formula on a product code but just to add up all of the positive quantites. Is this possibe?
 
Upvote 0
What I am trying to do is to use the sumif formula on a product code but just to add up all of the positive quantites. Is this possibe?
Adjust to:
Code:
=SUMPRODUCT((A1:A4="product code")*(B1:B4>0)*(B1:B4))
For each line, Excel will check if 3 criteria is fulfilled or not, if yes, sumproduct with sum up the quantities.
 
Upvote 0
trying to avoid sumproduct if I can as it makes up a whole lot of memory - working with a hugh file. Any alternatives, especially using sumif?
 
Upvote 0
Do you have Excel 2007? That has SUMIFS for multiple criteria.
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,683
Members
452,937
Latest member
Bhg1984

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