Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default count occurrence between two specific dates

A B C
1 name date offence
2 j.smith 01-Jan-05 eating
3 r.donlad 09-Feb-05 drinking
4 a.pedrosa 11-Mar-05 eating
5 m.patel 13-Dec-06 eating
6. t.pot 06-Apr-06 eating

above is a spreadsheet i am working on. above each column is a 'sort'
button which sorts by name, date or offence. I need to calculate how many
times an offence is committed between specific term dates. I don't think I
can use a 'range' of cells, because if one of the 'sort' buttons is clicked
on the, data changes within that range.

if i want to calculate the amount of times 'eating' occurs between 01-jan-05
and 13-dec-06, the result returned should be '3', regardless if any 'sort'
buttons are pressed. Please help!!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default count occurrence between two specific dates

D1=01/01/05
D2=13/12/06
D3="eating"

If the dates are "inclusive" result is 4

=SUMPRODUCT(--($B$2:$B$6=D1),--($B$2:$B$6<=D2),--($C$2:$C$6=D3))

"AzMan" wrote:

A B C
1 name date offence
2 j.smith 01-Jan-05 eating
3 r.donlad 09-Feb-05 drinking
4 a.pedrosa 11-Mar-05 eating
5 m.patel 13-Dec-06 eating
6. t.pot 06-Apr-06 eating

above is a spreadsheet i am working on. above each column is a 'sort'
button which sorts by name, date or offence. I need to calculate how many
times an offence is committed between specific term dates. I don't think I
can use a 'range' of cells, because if one of the 'sort' buttons is clicked
on the, data changes within that range.

if i want to calculate the amount of times 'eating' occurs between 01-jan-05
and 13-dec-06, the result returned should be '3', regardless if any 'sort'
buttons are pressed. Please help!!

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
Count Specific word in specific range [email protected] Excel Worksheet Functions 2 May 16th 06 10:30 AM
Count If Specific word in specific range [email protected] Excel Discussion (Misc queries) 2 May 16th 06 10:14 AM
Count occurrence of character within a cell Kelli Excel Discussion (Misc queries) 2 January 18th 06 02:20 PM
Match Last Occurrence of Numeric Value and Count BACK to Previous Sam via OfficeKB.com Excel Worksheet Functions 4 November 24th 05 02:15 AM
Match Last Occurrence of two numbers and Count to Previous Occurence Sam via OfficeKB.com Excel Worksheet Functions 33 April 4th 05 02:17 PM


All times are GMT +1. The time now is 11:25 PM.

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

About Us

"It's about Microsoft Excel"