# SUMIF Based on two criteria

#### ShaneUK

##### New Member
Hi

Am trying to do a SUMIF based on two criteria, where the first criteria is based on a date.

Basically, in column B is a date, column C is a title, and column D has an amount. I am trying to find a forumla that will add all of Column D but only if column B is equal to or more than 1st of the month (say October) and equal or less than the last day of month (so in this case 1st October - 31st October). Also Column C would say need to equal X and not Y or Z

Thanks

Shane

### Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

#### acw

##### MrExcel MVP
Shane

Have a look at the SUMPRODUCT function. Search through the board for some examples you could modify to suit your structure.

Tony

##### MrExcel MVP
Hi

Am trying to do a SUMIF based on two criteria, where the first criteria is based on a date.

Basically, in column B is a date, column C is a title, and column D has an amount. I am trying to find a forumla that will add all of Column D but only if column B is equal to or more than 1st of the month (say October) and equal or less than the last day of month (so in this case 1st October - 31st October). Also Column C would say need to equal X and not Y or Z

Thanks

Shane

=SUMPRODUCT(--(\$B\$2:\$B\$400-DAY(\$B\$2:B\$400)+1=F2),--(\$C\$2:\$C\$400=C2),\$D\$2:\$D4400)

where F2 houses a month/year of interest entered as the first day date like 1-Oct-2006 and G2 a title of interest.

Replies
1
Views
102
Replies
7
Views
350
Replies
2
Views
174
Replies
2
Views
174
Replies
3
Views
171

1,141,589
Messages
5,707,267
Members
421,499
Latest member
Dpbj

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