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

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
What version of excel do you have , it would help to have that in profile as later versions have a lot more available functions and these may work better on closed spreadsheets


countifs()
are these 2 separate workbooks or sheets in the same worksheet

countifs( manhourrespnse!column B, ">="&1/1/23 , manhourrespnse!column B, "<="&31/1/23 , ColumnD , Auburn)

what are you using for Year?



Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
 
Upvote 0
I have office 365 Version 3212 64 bit

The are currently 2 separate workbooks. They could Easly be placed into one work book as separate sheets

Here is the link to the google drive I was not able to get the XL22bB to work


There is a 2023 version and a 2024 version
In Man Hour - Response Area Dat

I will keep working on the XL22dB

Thanks
 
Upvote 0
This is the sheet i want the data to end in

Monthly Yearly Calls.xlsx
ABC
1 YearMonth
2Total0
3Auburn2
4Deer Lake2
5East Brunswick22
6East Norwegian1
7Friedensburg1
8Hamburg2
9New Ringgold3
10North Manheim43
11Norwegian 1
12Orwigsburg65
13Port Clinton1
14Pottsville7
15Shoemakersville2
16South Manheim1
17Walker Township1
18West Brunswick74
19Windsor11
Sheet1
Cell Formulas
RangeFormula
B2:B19B2=COUNTIF('H:\.shortcut-targets-by-id\1pGFKJ46Oxyu5_GN0Prj7aGWYkPtilVlz\Orwigsburg Fire Company Google Drive\Chief\MR. Excel Forum\[Man Hour - Response Area Data 2023.xlsx]Sheet1'!$D$2:$D$230,A2)
C19C19=COUNTIF('H:\.shortcut-targets-by-id\1pGFKJ46Oxyu5_GN0Prj7aGWYkPtilVlz\Orwigsburg Fire Company Google Drive\Chief\MR. Excel Forum\[Man Hour - Response Area Data 2023.xlsx]Sheet1'!$D$2:$D$230,A19)



This is the sheet the data would pull from
Man Hour - Response Area Data 2024.xlsx
ABCDEFGHIJKLMN
1Call NumberDateCallAreaArea ID Number of PeopleMinutesTotal MinutesTotal Man HoursDay of the WeekTime of DayShiftOfficerNotes
211-JanAFAWest Brunswick 3512445288.80Monday14:061Y
323-JanAFAWest Brunswick 3510303005.00Wednesday13:201Y
434-JanMVA w/ Entrapment - CX enrouteWest Brunswick 35127841.40Thursday14:201Y
546-JanGrain Dryer FireWest Brunswick 358144115219.20Saturday6:513Y
656-JanMVA w/ No InjuriesOrwigsburg5612333966.60Saturday14:171Y
767-JanEMS Assist - Cardiac ArrestWest Brunswick 3512414928.20Sunday12:541Y
878-JanMVA w/ Entrapment - CX enrouteEast Brunswick786480.80Monday15:592Y
989-JanPump DetailNorth Manheim188705609.33Tuesday21:412Y
1099-JanPump DetailNorth Manheim187704908.17Tuesday23:102Y
111013-JanTree DownNorth Manheim185412053.42Saturday7:541Y
121113-JanMVA w/ InjuriesNorth Manheim188246196832.80Saturday9:511Y
131213-JanTree DownNorth Manheim18210200.33Saturday13:031Y
141314-JanAFANorth Manheim18615901.50Sunday13:051Y
151414-JanTree DownNorth Manheim18510500.83Sunday13:101Y
161514-JanWire DownNorth Manheim187694838.05Sunday13:201Y
171614-JanWire DownWest Brunswick 3564240.40Sunday14:161Y
181720-JanApartment Building Fire - CX enroutePottsville689161442.40Saturday13:101Y
191820-JanMVA w/ No InjuriesOrwigsburg56175288414.73Saturday21:362Y
201921-JanSteam Event - No FireWest Brunswick 3513162083.47Sunday20:322Y
212024-JanHouse Fire - CX enrouteWest Brunswick 357151051.75Wednesday8:101Y
222125-JanAFAEast Brunswick768480.80Thursday19:082Y
232228-JanUtilities InvestigationOrwigsburg566171021.70Sunday23:483Y
242330-JanOil Burner MalfunctionLandingville479363245.40Tuesday15:172Y
25243-FebLanding ZoneNorth Manheim188362884.80Saturday17:372Y
Sheet1
 
Upvote 0
you need to allow access to everyone on google drive to access the file

how about
=COUNTIFS(Sheet1!$B$2:$B$100,">="&DATEVALUE("1/1/2024"),Sheet1!$B$2:$B$100,"<="&DATEVALUE("31/1/2024"),Sheet1!$D$2:$D$100,A3)

BUT the dates can be put into another cell and used - so you can change the months
 
Upvote 0
you need to allow access to everyone on google drive to access the file

how about
=COUNTIFS(Sheet1!$B$2:$B$100,">="&DATEVALUE("1/1/2024"),Sheet1!$B$2:$B$100,"<="&DATEVALUE("31/1/2024"),Sheet1!$D$2:$D$100,A3)

BUT the dates can be put into another cell and used - so you can change the months
Sorry I had it set to anyone with the link.. Also got the XL2BB working and attached those above. What do you mean change the months

This is the main data sheet
Man Hour - Response Area Data 2024.xlsx
ABCDEFGHIJKLM
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
25242/3/2024Landing ZoneNorth Manheim188362884.80Saturday17:372Y
Sheet1


This is the data sheet i am using to try and build some charts All in the same workbook now

Man Hour - Response Area Data 2024.xlsx
ABC
1 YearMonth
2Total00
3Auburn00
4Deer Lake00
5East Brunswick20
6East Norwegian00
7Friedensburg00
8Hamburg00
9New Ringgold00
10North Manheim90
11Norwegian 00
12Orwigsburg20
13Port Clinton00
14Pottsville10
15Shoemakersville00
16South Manheim00
17Walker Township00
18West Brunswick00
19Windsor0#VALUE!
Sheet2
Cell Formulas
RangeFormula
B2:B19B2=COUNTIF(Sheet1!D1:D24,A2)
C2C2=COUNTIFS(Sheet2!$B$2:$B$100,">="&DATEVALUE("1/1/2024"),Sheet2!$B$2:$B$100,"<="&DATEVALUE("31/1/2024"),Sheet2!$D$2:$D$100,A3)
C3:C18C3=COUNTIFS(Sheet1!$D$2:$D$100,">="&DATEVALUE("1/1/2024"),Sheet1!$B$2:$B$100,"<="&DATEVALUE("31/1/2024"),Sheet1!$D$2:$D$100,A3)
C19C19=COUNTIF('H:\.shortcut-targets-by-id\1pGFKJ46Oxyu5_GN0Prj7aGWYkPtilVlz\Orwigsburg Fire Company Google Drive\Chief\MR. Excel Forum\[Man Hour - Response Area Data 2023.xlsx]Sheet1'!$D$2:$D$230,A19)
 
Upvote 0
i used the xl2bb and replied earlier, with the formula

Book7
ABC
1 YearMonth
2Total#VALUE!
3Auburn#VALUE!3
4Deer Lake#VALUE!0
5East Brunswick#VALUE!2
6East Norwegian#VALUE!0
7Friedensburg#VALUE!0
8Hamburg#VALUE!0
9New Ringgold#VALUE!0
10North Manheim#VALUE!6
11Norwegian #VALUE!0
12Orwigsburg#VALUE!3
13Port Clinton#VALUE!0
14Pottsville#VALUE!1
15Shoemakersville#VALUE!0
16South Manheim#VALUE!0
17Walker Township#VALUE!0
18West Brunswick#VALUE!0
19Windsor#VALUE!0
Sheet2
Cell Formulas
RangeFormula
B2:B19B2=COUNTIF('/Users/waynewalker/Downloads/H:\.shortcut-targets-by-id\1pGFKJ46Oxyu5_GN0Prj7aGWYkPtilVlz\Orwigsburg Fire Company Google Drive\Chief\MR. Excel Forum\[Man Hour - Response Area Data 2023.xlsx]Sheet1'!$D$2:$D$230,A2)
C3:C19C3=COUNTIFS(Sheet1!$B$2:$B$100,">="&DATEVALUE("1/1/2024"),Sheet1!$B$2:$B$100,"<="&DATEVALUE("31/1/2024"),Sheet1!$D$2:$D$100,A3)
 
Upvote 0
i used the xl2bb and replied earlier, with the formula

Book7
ABC
1 YearMonth
2Total#VALUE!
3Auburn#VALUE!3
4Deer Lake#VALUE!0
5East Brunswick#VALUE!2
6East Norwegian#VALUE!0
7Friedensburg#VALUE!0
8Hamburg#VALUE!0
9New Ringgold#VALUE!0
10North Manheim#VALUE!6
11Norwegian #VALUE!0
12Orwigsburg#VALUE!3
13Port Clinton#VALUE!0
14Pottsville#VALUE!1
15Shoemakersville#VALUE!0
16South Manheim#VALUE!0
17Walker Township#VALUE!0
18West Brunswick#VALUE!0
19Windsor#VALUE!0
Sheet2
Cell Formulas
RangeFormula
B2:B19B2=COUNTIF('/Users/waynewalker/Downloads/H:\.shortcut-targets-by-id\1pGFKJ46Oxyu5_GN0Prj7aGWYkPtilVlz\Orwigsburg Fire Company Google Drive\Chief\MR. Excel Forum\[Man Hour - Response Area Data 2023.xlsx]Sheet1'!$D$2:$D$230,A2)
C3:C19C3=COUNTIFS(Sheet1!$B$2:$B$100,">="&DATEVALUE("1/1/2024"),Sheet1!$B$2:$B$100,"<="&DATEVALUE("31/1/2024"),Sheet1!$D$2:$D$100,A3)
Ok sorry.. Just learning this.. So i pasted that into C3 and its not returning results
 
Upvote 0
i had to change some values to get it to work with the data
have you copied the formula down
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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