Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default formula for calculating repeat occurences between specified dates

I have a spreadsheet which is as follows:

NAME DATE OFFENCE
J.Smith 1-Jan-05 eating
M.Patel 9-feb-05 drinking
T.Pot 11-mar-05 eating
E.Colin 13-dec-06 eating
A.Idle 6-apr-06 eating

I want to calculate the amount of times 'eating' occurs between 1-jan-05 and
11-mar-05. I've tried a formula which counts the occurences between a range,
but because there are 'sort' buttons over name, date and offence and the data
shifts location each time a user 'sorts' something, my figures are no longer
accurate. Please help!



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default formula for calculating repeat occurences between specified dates

=SUMPRODUCT(-(B2:B5=DATE(2005,1,1)),-(C2:C5="eating"))


"AzMan" wrote:

I have a spreadsheet which is as follows:

NAME DATE OFFENCE
J.Smith 1-Jan-05 eating
M.Patel 9-feb-05 drinking
T.Pot 11-mar-05 eating
E.Colin 13-dec-06 eating
A.Idle 6-apr-06 eating

I want to calculate the amount of times 'eating' occurs between 1-jan-05 and
11-mar-05. I've tried a formula which counts the occurences between a range,
but because there are 'sort' buttons over name, date and offence and the data
shifts location each time a user 'sorts' something, my figures are no longer
accurate. Please help!



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default formula for calculating repeat occurences between specified da

ignore the previous reply.

=SUMPRODUCT((B2:B5=DATE(2005,1,1))*(B2:B5<=DATE(2 005,3,11))*(C2:C5="eating"))


"Teethless mama" wrote:

=SUMPRODUCT(-(B2:B5=DATE(2005,1,1)),-(C2:C5="eating"))


"AzMan" wrote:

I have a spreadsheet which is as follows:

NAME DATE OFFENCE
J.Smith 1-Jan-05 eating
M.Patel 9-feb-05 drinking
T.Pot 11-mar-05 eating
E.Colin 13-dec-06 eating
A.Idle 6-apr-06 eating

I want to calculate the amount of times 'eating' occurs between 1-jan-05 and
11-mar-05. I've tried a formula which counts the occurences between a range,
but because there are 'sort' buttons over name, date and offence and the data
shifts location each time a user 'sorts' something, my figures are no longer
accurate. Please help!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default formula for calculating repeat occurences between specified dates

=SUMPRODUCT(--(B2:B638352),--(B2:B6<38423),--(C2:C6="eating"))

--
Gary''s Student - gsnu200717


"AzMan" wrote:

I have a spreadsheet which is as follows:

NAME DATE OFFENCE
J.Smith 1-Jan-05 eating
M.Patel 9-feb-05 drinking
T.Pot 11-mar-05 eating
E.Colin 13-dec-06 eating
A.Idle 6-apr-06 eating

I want to calculate the amount of times 'eating' occurs between 1-jan-05 and
11-mar-05. I've tried a formula which counts the occurences between a range,
but because there are 'sort' buttons over name, date and offence and the data
shifts location each time a user 'sorts' something, my figures are no longer
accurate. Please help!



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default formula for calculating repeat occurences between specified da

Hi, the formula you have below gives back a result of '1' for the word
'eating'. Surely it should be '2' if the date range was between b2 and b5?
Thanks for responding so quickly, and hope you can help.

"Teethless mama" wrote:

=SUMPRODUCT(-(B2:B5=DATE(2005,1,1)),-(C2:C5="eating"))


"AzMan" wrote:

I have a spreadsheet which is as follows:

NAME DATE OFFENCE
J.Smith 1-Jan-05 eating
M.Patel 9-feb-05 drinking
T.Pot 11-mar-05 eating
E.Colin 13-dec-06 eating
A.Idle 6-apr-06 eating

I want to calculate the amount of times 'eating' occurs between 1-jan-05 and
11-mar-05. I've tried a formula which counts the occurences between a range,
but because there are 'sort' buttons over name, date and offence and the data
shifts location each time a user 'sorts' something, my figures are no longer
accurate. 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
is there a formula for calculating dates 3 mos out Lawrence Excel Discussion (Misc queries) 1 July 28th 06 06:46 PM
Need help with a formula for calculating based on a rage of dates djeans Excel Discussion (Misc queries) 7 July 2nd 05 09:06 PM
Counting occurences of a specific day between two dates coal_miner Excel Worksheet Functions 1 April 20th 05 03:37 PM
Count occurences between dates DJ Dusty Excel Worksheet Functions 0 November 11th 04 09:02 PM
Count occurences between dates DJ Dusty Excel Worksheet Functions 3 November 11th 04 12:25 AM


All times are GMT +1. The time now is 06:14 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"