# Sumif - applying function to the criteria

#### TheBigDog

##### Board Regular
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)

### Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Try:

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

confirmed with CTRL+SHIFT+ENTER not just ENTER...

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)

Thanks for the CSE help. That should do it.

Thanks for the CSE help. That should do it.

If you ensure that all months are of the same year in the target range. Otherwise you need to expand the suggested formula.

Replies
1
Views
274
Replies
6
Views
253
Replies
6
Views
373
Replies
14
Views
590
Replies
2
Views
100

1,219,935
Messages
6,151,065
Members
451,006
Latest member
dhinze84

### 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.

### Which adblocker are you using?

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

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