# Extracting Time Spent on a Project in a Given Month

#### G Wiz

##### New Member
Is there a way to get excel to use data validation to select a month, and it give results in a cell that picks out only the entries based on the month selected.

The dates are currently entered in this format:

 16/08/2021 21/08/2021 29/08/2021 30/08/2021 04/09/2021 07/09/2021 11/09/2021 11/09/2021 11/09/2021 12/09/2021 13/09/2021 13/09/2021 13/09/2021 13/09/2021

This would also need to be based on another data validation result.

I'd like to have a sheet calculate the amount of hours worked on a project in a selected month:

 Project # Project Title Month Hours ECA ECA abcdefg January

The hours and month would need to refer back to the main timesheet entries:

 Date Start Finish Hours Project # Project Title 16/08/2021 21:15 22:30 01:15 ECA ECA abcdefg 21/08/2021 13:30 17:00 03:30 ECA ECA abcdefg 29/08/2021 20:30 23:00 02:30 ECA ECA abcdefg 30/08/2021 10:30 11:45 01:15 ECA ECA abcdefg 04/09/2021 11:30 13:30 02:00 ECA ECA abcdefg 07/09/2021 21:30 22:30 01:00 ECA ECA abcdefg 11/09/2021 14:45 15:30 00:45 ECA ECA abcdefg 11/09/2021 16:30 16:45 00:15 ECA ECA abcdefg 11/09/2021 18:00 19:00 01:00 ECA ECA abcdefg 12/09/2021 20:30 23:15 02:45 ECA ECA abcdefg 13/09/2021 07:30 08:30 01:00 ECA ECA abcdefg

Is this achievable?

### Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

#### Eric W

##### MrExcel MVP
I'd recommend using the 1st of the month in your selection criteria (cell J3 below) because you can include the year that way. Then you can do something like this:

Book1
ABCDEFGHIJK
1DateStartFinishHoursProject #Project Title
216/08/202121:1522:301:15ECAECA abcdefgProject #Project TitleMonthHours
321/08/202113:3017:003:30ECAECA abcdefgECAECA abcdefg1/09/20218:45
429/08/202120:3023:002:30ECAECA abcdefgECAECA abcdefgSeptember8:45
530/08/202110:3011:451:15ECAECA abcdefg
64/09/202111:3013:302:00ECAECA abcdefg
77/09/202121:3022:301:00ECAECA abcdefg
811/09/202114:4515:300:45ECAECA abcdefg
911/09/202116:3016:450:15ECAECA abcdefg
1011/09/202118:0019:001:00ECAECA abcdefg
1112/09/202120:3023:152:45ECAECA abcdefg
1213/09/20217:308:301:00ECAECA abcdefg
13
Sheet46
Cell Formulas
RangeFormula
K3K3=SUMIFS(D2:D12,A2:A12,">="&J3,A2:A12,"<="&EOMONTH(J3,0),E2:E12,H3)
K4K4=SUMPRODUCT(D2:D12,--(E2:E12=H4),--(TEXT(A2:A12,"mmmm")=J4))

If you want to stick with the month only, you can try the K4 formula.

#### G Wiz

##### New Member
Right, OK. Ill give that a go! Thanks.
Will update on progress...

Replies
3
Views
151
Replies
3
Views
265
Replies
2
Views
315
Replies
3
Views
318
Replies
17
Views
465

1,191,077
Messages
5,984,503
Members
439,894
Latest member
Amba1006

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