summation formula help

squalls

New Member
Joined
Jun 20, 2011
Messages
2
Hi, i need some help in determining the best way to sum a set of numbers. Basically, i would like to sum by month and by positive or negative. So, for example i have the below spreadsheet:

Col A Col B
5/21 97
5/30 80
6/4 -92
6/10 50
6/12 75

Is there a formula I could use to sum all positive numbers for the month of June? Also, would it be possible to do that without using "dates after 5/31/2011 and before 7/1/2011"? Basically i am looking to keep this formula referenced to the first day of each month and as that date goes from 5/1 to 6/1, i would like the formula to update as well.

thanks so much for your help
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hi, i need some help in determining the best way to sum a set of numbers. Basically, i would like to sum by month and by positive or negative. So, for example i have the below spreadsheet:

Col A Col B
5/21 97
5/30 80
6/4 -92
6/10 50
6/12 75

Is there a formula I could use to sum all positive numbers for the month of June? Also, would it be possible to do that without using "dates after 5/31/2011 and before 7/1/2011"? Basically i am looking to keep this formula referenced to the first day of each month and as that date goes from 5/1 to 6/1, i would like the formula to update as well.

thanks so much for your help
E2: 1-Jun-11

On Excel 2007 or later:
Code:
=SUMIFS($B$2:$B$6,$B$2:$B$6,">0",$A$2:$A$6,">="&E2,
    $A$2:$A$6,"<="&EOMONTH(E2,0))

On all versions:
Code:
=SUMPRODUCT(
    $B$2:$B$6,
    --($B$2:$B$6>0),
    --($A$2:$A$6-DAY($A$2:$A$6)+1=E2))

For negs, change > to <.
 
Upvote 0
Thank you so much, that formula worked, now i dont have to have all these additional hidden columns to achieve my desired result.

thanks!
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,258
Members
452,901
Latest member
LisaGo

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