Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 2
Default Counting multiple occcurrences between date range

I was wondering if anyone could assist me with an excel problem.

I have a table in one worksheet that details health and safety incidents. The data captured includes:


Column A: Date of Incident

Column B: Category of Incident – Cat 1 = slip, trip or fall, cat 2 = physical assault and so on up to cat 10.

Column C: Summary


On a separate worksheet I have a table split by month across the top (Jan-Dec columns B:M) and Category 1-10 down column A (A2:A11). This table drives graphs that detail occurrences by month of each type of incident.

I was wondering if there is a way to count the number of times each category occurs between date ranges that will automatically populate the table that drives the graphs?

I was thinking that a countif formula within the table would be the best solution with the formula amended in each row and column to reflect month and category.

Any assistance would be greatly received
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Counting multiple occcurrences between date range

Hi,

Am Thu, 25 Apr 2013 16:12:58 +0100 schrieb KH3557:

Column A: Date of Incident

Column B: Category of Incident – Cat 1 = slip, trip or fall, cat 2 =
physical assault and so on up to cat 10.

Column C: Summary


I was wondering if there is a way to count the number of times each
category occurs between date ranges that will automatically populate the
table that drives the graphs?


for Cat 1 between 1/1/13 and 3/31/13 try:
=SUMPRODUCT(--($A$2:$A$1000=DATE(2013,1,1)),--($A$2:$A$1000<=DATE(2013,3,31)),--($B$2:$B$1000="Cat 1"))



Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Junior Member
 
Posts: 2
Default

Works like a dream, many thanks, much appreciated


Quote:
Originally Posted by Claus Busch View Post
Hi,

Am Thu, 25 Apr 2013 16:12:58 +0100 schrieb KH3557:

Column A: Date of Incident

Column B: Category of Incident – Cat 1 = slip, trip or fall, cat 2 =
physical assault and so on up to cat 10.

Column C: Summary


I was wondering if there is a way to count the number of times each
category occurs between date ranges that will automatically populate the
table that drives the graphs?


for Cat 1 between 1/1/13 and 3/31/13 try:
=SUMPRODUCT(--($A$2:$A$1000=DATE(2013,1,1)),--($A$2:$A$1000<=DATE(2013,3,31)),--($B$2:$B$1000="Cat 1"))



Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #4   Report Post  
Member
 
Posts: 93
Default

Hi KH3557

If the dates in B1:M1 are proper dates and formatted as "mmm" and the year =2013

Try the following sumproduct formula on sheet2 in cell B2 copy across and down. Format as something simple "General;;" to remove zero values. Adjust the sheet and ranges to suit your needs.

=SUMPRODUCT(--(MONTH(Sheet1!$A$2:$A$100)=MONTH(B$1)),--(Sheet1!$B$2:$B$100=$A2))

Kevin



Quote:
Originally Posted by KH3557 View Post
I was wondering if anyone could assist me with an excel problem.

I have a table in one worksheet that details health and safety incidents. The data captured includes:


Column A: Date of Incident

Column B: Category of Incident – Cat 1 = slip, trip or fall, cat 2 = physical assault and so on up to cat 10.

Column C: Summary


On a separate worksheet I have a table split by month across the top (Jan-Dec columns B:M) and Category 1-10 down column A (A2:A11). This table drives graphs that detail occurrences by month of each type of incident.

I was wondering if there is a way to count the number of times each category occurs between date ranges that will automatically populate the table that drives the graphs?

I was thinking that a countif formula within the table would be the best solution with the formula amended in each row and column to reflect month and category.

Any assistance would be greatly received
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting a date range Julie New Users to Excel 2 October 17th 09 12:22 PM
counting multiple dates in a range majestyk Excel Worksheet Functions 1 February 10th 09 05:01 PM
Counting Within a Date Range Tracey Excel Worksheet Functions 2 October 27th 07 01:59 PM
Counting if between date range Marc Shaw Excel Worksheet Functions 7 September 25th 06 07:26 PM
Counting from one range to another range, multiple criteria macamarr Excel Discussion (Misc queries) 3 June 10th 06 11:02 AM


All times are GMT +1. The time now is 10:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"