Calculating mumber of incidents per month

MarkoBrit

New Member
Joined
Mar 6, 2019
Messages
12
Hi , In Column B I have dates of incidents . How do I calculate how many incidents were in each month?
I tried this =COUNTIF((B2:B1000),"<31/01/2019") Which obviously calculates a range but is there a formula I can use that would just calculate each months incidents?
 
or

Column1Column2Column3Column4Column5Column6Column7Column8Column9Column10Column11Column2Count
Farnborough
03/01/2019​
Slip. Trip from HeightEmployeeMinorAberdeen
0​
Incl HO
49​
January
12​
Leeds
06/01/2019​
Contact with Sharp ObjectEmployeeMinorArnotts
0​
February
7​
Nottingham
07/01/2019​
Hit by Something StationaryVisitorMinorBelfast
0​
Minor
45​
Nottingham
07/01/2019​
Hit by Something StationaryVisitorMinorBirmingham
3​
Significant
3​
Gateshead
09/01/2019​
Slip, fall same levelEmployeeMinorBlanchardstown
0​
Major
1​
Factory Shop
10/01/2019​
Ill HealthEmployeeMinorBristol
1​
RIDDOR
0​
Thurrock
17/01/2019​
Contact with Sharp ObjectEmployeeMinorCardiff
1​
Birmingham
22/01/2019​
Slip. Trip from HeightVisitorMinorCroydon
0​
JAN
12​
Bristol
25/01/2019​
Slip, fall same levelEmployeeMinorDundrum
0​
FEB
0​
Thurrock
25/01/2019​
Hit by something Moving/FallingVisitorMinorEdinburgh
0​
MAR
Stockton
26/01/2019​
Hit by Something StationaryVisitorMinorFareham
2​
APR
Preston
27/01/2019​
OtherVisitorMinorFarnborough
1​
MAY
Liverpool
03/02/2019​
Slip. Trip from HeightVisitorMinorGateshead
1​
JUN
Leamington Spa
03/02/2019​
Manual HandlingEmployeeMinorGlasgow
0​
JUL
Stratford
04/02/2019​
Assault-PhysicalEmployeeMajorHull
0​
AUG
Fareham
04/02/2019​
Trapped between SomethingEmployeeMinorLeamington Spa
2​
SEPT
Thurrock
06/02/2019​
Manual HandlingEmployeeMinorLeeds
2​
OCT
Lincoln
19/02/2019​
Hit by Something StationaryVisitorMinorLincoln
1​
NOV
Southampton
19/02/2019​
OtherEmployeeMinorLiverpool
2​
DEC

Code:
[SIZE=1]// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    ExtractMonth = Table.TransformColumns(Source, {{"Column2", each Date.MonthName(_), type text}}),
    Group = Table.Group(ExtractMonth, {"Column2"}, {{"Count", each Table.RowCount(Table.Distinct(_)), type number}})
in
    Group[/SIZE]
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Thanks Sandy666, but I have no idea what you did there , where do I put that code and do I need to chnge any of it and where did you put that "column 2" and "count" ? on the same sheet?
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,942
Members
449,094
Latest member
teemeren

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