Sumifs by month when the column has dates by day

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,347
Office Version
  1. 365
Platform
  1. Windows
I have a column (I) that has Dates in it (1/5/2017, 2/15/2018, 5/1/2017....)
My other two columns (F & N) have peoples names and hours worked each day

I want to sum by person how many hours they worked each month.

How can I do this?

Thanks for the help!!
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
I may be missing something, but not sure this answers what I need.

If I have dates (which are actuals by days) and I want to sum by Month how would your formula now to pull the sum by month?

Example: 5/1/2017, 2/2/2018, 5/15/2017, 6/30/2016, 11/18/2017...
And for Joe Smith he has 5 hours on 5/1/2017, 2 hours on 2/2/2018, 8 hours on 5/15/2017, 20 hours on 6/30/2016 and 6 hours on 11/18/2017

How do I sum Joe Smiths hours for May 2017?
I need a formula that would show me Joe charged 13 hours in May 2017 (5 Hours 5/1/2017 plus the 8 hours on 5/15/2017)

Thanks
 
Upvote 0
[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
F
[/TD]
[TD]
G
[/TD]
[TD]
H
[/TD]
[TD]
I
[/TD]
[TD]
J
[/TD]
[TD]
K
[/TD]
[TD]
L
[/TD]
[TD]
M
[/TD]
[TD]
N
[/TD]
[TD]
O
[/TD]
[TD]
P
[/TD]
[TD]
Q
[/TD]
[/TR]
[TR]
[TD]
1
[/TD]
[TD]name[/TD]
[TD][/TD]
[TD][/TD]
[TD]date[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]hour[/TD]
[TD][/TD]
[TD][/TD]
[TD]
May-2017​
[/TD]
[/TR]
[TR]
[TD]
2
[/TD]
[TD]Joe Smith[/TD]
[TD][/TD]
[TD][/TD]
[TD]
5/1/2017​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
5​
[/TD]
[TD][/TD]
[TD]Joe Smith[/TD]
[TD]
13​
[/TD]
[/TR]
[TR]
[TD]
3
[/TD]
[TD]Joe Smith[/TD]
[TD][/TD]
[TD][/TD]
[TD]
2/2/2018​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
2​
[/TD]
[TD][/TD]
[TD]Joe Doe[/TD]
[TD]
2​
[/TD]
[/TR]
[TR]
[TD]
4
[/TD]
[TD]Joe Smith[/TD]
[TD][/TD]
[TD][/TD]
[TD]
5/15/2017​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
8​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
5
[/TD]
[TD]Joe Smith[/TD]
[TD][/TD]
[TD][/TD]
[TD]
6/30/2017​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
20​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
6
[/TD]
[TD]Joe Smith[/TD]
[TD][/TD]
[TD][/TD]
[TD]
11/7/2017​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
6​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
7
[/TD]
[TD]Joe Doe[/TD]
[TD][/TD]
[TD][/TD]
[TD]
11/19/2017​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
8​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
8
[/TD]
[TD]Joe Doe[/TD]
[TD][/TD]
[TD][/TD]
[TD]
5/15/2017​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
2​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

where Q1 is 1/5/2017 format as mmm-yyyy

Q2=SUMPRODUCT(($F$2:$F$100=$P2)*($I$2:$I$100<>"")*(MONTH($I$2:$I$100)=MONTH($Q$1))*(YEAR($I$2:$I$100)=YEAR($Q$1)),$N$2:$N$100) copy down
 
Upvote 0
I may be missing something, but not sure this answers what I need.

If I have dates (which are actuals by days) and I want to sum by Month how would your formula now to pull the sum by month?

Example: 5/1/2017, 2/2/2018, 5/15/2017, 6/30/2016, 11/18/2017...
And for Joe Smith he has 5 hours on 5/1/2017, 2 hours on 2/2/2018, 8 hours on 5/15/2017, 20 hours on 6/30/2016 and 6 hours on 11/18/2017

How do I sum Joe Smiths hours for May 2017?
I need a formula that would show me Joe charged 13 hours in May 2017 (5 Hours 5/1/2017 plus the 8 hours on 5/15/2017)

Thanks

My bad. Try:

=SUMIFS(N:N,F:F,$X2,I:I,">="&Y$1,I:I,"<="&EOMONTH(Y$1,0))

where X2 houses a name of interest and Y$1 a first day date like 5/1/2017.

 
Upvote 0
Pivot Table using the Group by Year and Month for the Dates. With 2013 or after, you may like the Timeline to filter the desired period(s) by day/month or year.
Your source data is hopefully already set as a Table.
An advantage of a Pivot Table is when invalid data is entered, it will poke out. Data Validation can reduce that, but is best handled with Table references, which lends to the Pivot Table.
SUMIFS and other formulas have the advantage of not needing the separate refresh, as long as calculations are set to automatic.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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