Count how many times a name appears in a month

dlafko1

New Member
Joined
Oct 22, 2017
Messages
34
I am using an 2 excel spread sheets. One called monthly Yearly Calls and the other called Man Hour - Response Area Data 2023 this table is the main set of data.

In Man Hour - Response Area Data 2023
Column D has the area that i want to count.. Column B as the date.

In Monthly Yearly Calls
Column A has the name Column c is a month column.

I want to get from In Man Hour - Response Area Data 2023 how many times the name Auburn (lets say) appeared in January. I have an equation that does this for the year and references column A vs the actual name in case that changes over time.. Now i would like to know how to get it to count just a month.

IDK if we need a query or what. I'm no expert in a excel so please when providing an answer walk me thru it.
 

Attachments

  • Man Hour - Response Area Data 2023 spread sheet .jpg
    Man Hour - Response Area Data 2023 spread sheet .jpg
    164.4 KB · Views: 18
  • Monthly Calls Spreadsheet.jpg
    Monthly Calls Spreadsheet.jpg
    38.6 KB · Views: 17
it can be improved if you want different months - by using a cell with the date in
so instead of 1/1/24 - you could enter that in say A1
and instead of 31/1/24 - then use
=EOMONTH(A1,0)

=COUNTIFS(Sheet1!$B$2:$B$100,">="&$A$1,Sheet1!$B$2:$B$100,"<="&EOMONTH($A$1,0),Sheet1!$D$2:$D$100,A3)



Book7
ABC
11/1/24YearMonth
2Total
3Auburn3
4Deer Lake0
5East Brunswick2
6East Norwegian0
7Friedensburg0
8Hamburg0
9New Ringgold0
10North Manheim6
11Norwegian 0
12Orwigsburg3
13Port Clinton0
14Pottsville1
15Shoemakersville0
16South Manheim0
17Walker Township0
18West Brunswick0
19Windsor0
Sheet2
Cell Formulas
RangeFormula
C3:C19C3=COUNTIFS(Sheet1!$B$2:$B$100,">="&$A$1,Sheet1!$B$2:$B$100,"<="&EOMONTH($A$1,0),Sheet1!$D$2:$D$100,A3)
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
i had to change some values to get it to work with the data
have you copied the formula down
Yep I got it sorry it was the date was day then month as soon as i changed it to month then day Works great now Thanks
 
Upvote 0
you are welcome,
Yep, i'm in UK and so DD/MMM/YY is default format
 
Upvote 0
it can be improved if you want different months - by using a cell with the date in
so instead of 1/1/24 - you could enter that in say A1
and instead of 31/1/24 - then use
=EOMONTH(A1,0)

=COUNTIFS(Sheet1!$B$2:$B$100,">="&$A$1,Sheet1!$B$2:$B$100,"<="&EOMONTH($A$1,0),Sheet1!$D$2:$D$100,A3)



Book7
ABC
11/1/24YearMonth
2Total
3Auburn3
4Deer Lake0
5East Brunswick2
6East Norwegian0
7Friedensburg0
8Hamburg0
9New Ringgold0
10North Manheim6
11Norwegian 0
12Orwigsburg3
13Port Clinton0
14Pottsville1
15Shoemakersville0
16South Manheim0
17Walker Township0
18West Brunswick0
19Windsor0
Sheet2
Cell Formulas
RangeFormula
C3:C19C3=COUNTIFS(Sheet1!$B$2:$B$100,">="&$A$1,Sheet1!$B$2:$B$100,"<="&EOMONTH($A$1,0),Sheet1!$D$2:$D$100,A3)
OK I get it that works out much better

Thanks
 
Upvote 0
no problem
not another column
Just a cell A1

but could add a column for each month and put the month in row 1 of that column and use that

Or maybe even use something like today() , so pulls previous month ... But on the 1st of the next month - that will just change the data

anyway - different ways to do this - rather than have it in the actual formula and have to edit / replace them all
 
Upvote 0
no problem
not another column
Just a cell A1

but could add a column for each month and put the month in row 1 of that column and use that

Or maybe even use something like today() , so pulls previous month ... But on the 1st of the next month - that will just change the data

anyway - different ways to do this - rather than have it in the actual formula and have to edit / replace them all
Love it thanks I am gonna go with the first solution I think that will be easiest for the person using it who is not very tech savy. Thank you.
 
Upvote 0
@etaf

One more question with the main table Man hours there is a colum for Total Man hours Column I

How can i do a sum of those total hours for month and year? Would you use the same formulas? I dont think you could because your not counting them but summing them

Man Hour - Response Area Data 2024.xlsx
ABCDEFGHIJKLMN
1Call NumberDateCallAreaArea ID Number of PeopleMinutesTotal MinutesTotal Man HoursDay of the WeekTime of DayShiftOfficerNotes
211/1/2024AFAWest Brunswick 3512445288.80Monday14:061Y
321/3/2024AFAWest Brunswick 3510303005.00Wednesday13:201Y
431/4/2024MVA w/ Entrapment - CX enrouteWest Brunswick 35127841.40Thursday14:201Y
541/6/2024Grain Dryer FireWest Brunswick 358144115219.20Saturday6:513Y
651/6/2024MVA w/ No InjuriesOrwigsburg5612333966.60Saturday14:171Y
761/7/2024EMS Assist - Cardiac ArrestWest Brunswick 3512414928.20Sunday12:541Y
871/8/2024MVA w/ Entrapment - CX enrouteEast Brunswick786480.80Monday15:592Y
981/9/2024Pump DetailNorth Manheim188705609.33Tuesday21:412Y
1091/9/2024Pump DetailNorth Manheim187704908.17Tuesday23:102Y
11101/13/2024Tree DownNorth Manheim185412053.42Saturday7:541Y
12111/13/2024MVA w/ InjuriesNorth Manheim188246196832.80Saturday9:511Y
13121/13/2024Tree DownNorth Manheim18210200.33Saturday13:031Y
14131/14/2024AFANorth Manheim18615901.50Sunday13:051Y
15141/14/2024Tree DownNorth Manheim18510500.83Sunday13:101Y
16151/14/2024Wire DownNorth Manheim187694838.05Sunday13:201Y
17161/14/2024Wire DownWest Brunswick 3564240.40Sunday14:161Y
18171/20/2024Apartment Building Fire - CX enroutePottsville689161442.40Saturday13:101Y
19181/20/2024MVA w/ No InjuriesOrwigsburg56175288414.73Saturday21:362Y
20191/21/2024Steam Event - No FireWest Brunswick 3513162083.47Sunday20:322Y
21201/24/2024House Fire - CX enrouteWest Brunswick 357151051.75Wednesday8:101Y
22211/25/2024AFAEast Brunswick768480.80Thursday19:082Y
23221/28/2024Utilities InvestigationOrwigsburg566171021.70Sunday23:483Y
24231/30/2024Oil Burner MalfunctionLandingville479363245.40Tuesday15:172Y
main



Man Hour - Response Area Data 2024.xlsx
ABC
11/1/2024YearMonth
2Training Hours200137
3Admin Hours8050.5
4Response Hours 190145.08
Hours



Thanks
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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