Sumif - applying function to the criteria

TheBigDog

Board Regular
Joined
Aug 5, 2002
Messages
59
Here is the what the two columns look like

Date Profit
1/1/2006 1
2/2/2006 2
2/3/2006 3
4/4/2006 4


I want to get the sum of the profit only if the month is Feb by using the Month() function (return a number from 1-12, signifying a month)

Can I do that with a SumIf statement? if not, any good suggestions? (without creating another column)

Thanks in advance.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Try:

=SUM(IF(MONTH(A1:A10)=2,B1:B10))

adjust ranges to suit.

confirmed with CTRL+SHIFT+ENTER not just ENTER...
 
Upvote 0
Book1
ABCDEFG
1DateProfit
21/1/200611-Feb-0628-Feb-065
32/2/20062
42/3/20063
54/4/20064
6
Sheet1


F2:

=EOMONTH(E2,0)

G2

=SUMIF($A$2:$A$5,">="&E2,$B$2:$B$5)-SUMIF($A$2:$A$5,">"&F2,$B$2:$B$5)
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,864
Members
449,052
Latest member
Fuddy_Duddy

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