SUMIF Based on two criteria

ShaneUK

New Member
Joined
Aug 21, 2006
Messages
25
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

Can someone please help me!!

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
Joined
Feb 13, 2004
Messages
4,814
Shane

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


Tony
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
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

Can someone please help me!!

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.
 

Forum statistics

Threads
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.
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
Top