Using SUMIF to add all data for a given time period

pbgexcel

New Member
Joined
Jan 2, 2018
Messages
26
Good afternoon all,

I have a column (P) containing every date from 2010-2017, beside another column (Q) containing an item of data for that date. I want to sum together the data only for January 2011, but my SUMIF always gives '0' (all data is >0 so). Any ideas? This is what I'm working with:

=SUMIF($P$2:$P$52609,AND(MONTH($P$2:$P$52609)=1,YEAR($P$2:$P$52609)=2011),Q$2:Q$52609)

Thanks so much for your help!
 

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.
No, you can't manipulate the date range with any functions in the sumif.
It can only evaluate the date range exactly as it exists.

Instead of thinking like Month = x and year = x,
Think like Between 1/1/2011 and 1/31/2011

=SUMIFS(Q$2:Q$52609,$P$2:$P$52609,">="&DATE(2011,1,1),$P$2:$P$52609,"<="&DATE(2011,1,31))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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