Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default Counting records in a column range occuring between specific dates

I'm using Excel 2003, Win XP. I just want to enter a funtion/formula that
counts how many times a record appears in a range between two specific dates
rather than having to filter the records and do a count. I've been trying
the COUNTIF function but without any luck. Example:
=COUNTIF(A1:A200,=12012008,<=12312008). I know this is completely wrong
but you get the idea. Thanks in advance. Jeremy.

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 15,768
Default Counting records in a column range occuring between specific dates

Try one of these:

=COUNTIF(A1:A200,"="&DATE(2008,12,1))-COUNTIF(A1:A200,""&DATE(2008,12,31))

Or, better to use cells to hold the date boundaries:

C1 = lower boundary = 12/1/2008
D1 = upper boundary = 12/31/2008

=COUNTIF(A1:A200,"="&C1)-COUNTIF(A1:A200,""&D1)

--
Biff
Microsoft Excel MVP


"Jeremy Prosser" wrote in message
...
I'm using Excel 2003, Win XP. I just want to enter a funtion/formula that
counts how many times a record appears in a range between two specific
dates
rather than having to filter the records and do a count. I've been trying
the COUNTIF function but without any luck. Example:
=COUNTIF(A1:A200,=12012008,<=12312008). I know this is completely wrong
but you get the idea. Thanks in advance. Jeremy.



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 964
Default Counting records in a column range occuring between specific dates

Try the SUMPRODUCT function:

Something like:

=SUMPRODUCT(--(A1:A200=DATE(2008,12,1)),--(A1:A200<=DATE(2008,12,31)))

You could also place your min and max dates in separate cells, such as B1
and B2. Then use:

=SUMPRODUCT(--(A1:A200=B1),--(A1:A200<=B2))

HTH
Elkar


"Jeremy Prosser" wrote:

I'm using Excel 2003, Win XP. I just want to enter a funtion/formula that
counts how many times a record appears in a range between two specific dates
rather than having to filter the records and do a count. I've been trying
the COUNTIF function but without any luck. Example:
=COUNTIF(A1:A200,=12012008,<=12312008). I know this is completely wrong
but you get the idea. Thanks in advance. Jeremy.

  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11,058
Default Counting records in a column range occuring between specific dates

You need COUNTIF's big brother, SUMPRODUCT():

=SUMPRODUCT(--(A1:A100=DATEVALUE("12/1/2008")),--(A1:A100<=DATEVALUE("12/31/2008")))



--
Gary''s Student - gsnu200828


"Jeremy Prosser" wrote:

I'm using Excel 2003, Win XP. I just want to enter a funtion/formula that
counts how many times a record appears in a range between two specific dates
rather than having to filter the records and do a count. I've been trying
the COUNTIF function but without any luck. Example:
=COUNTIF(A1:A200,=12012008,<=12312008). I know this is completely wrong
but you get the idea. Thanks in advance. Jeremy.

  #5   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Counting records in a column range occuring between specific dates

And if the dates range is for a certain month/year, ie the range doesn't cut
across months, you could use this to count it for all dates falling in Dec
2008 (for eg):
=SUMPRODUCT(--(TEXT(A1:A200,"mmmyyyy")="Dec2008"))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
"Jeremy Prosser" wrote:
I'm using Excel 2003, Win XP. I just want to enter a funtion/formula that
counts how many times a record appears in a range between two specific dates
rather than having to filter the records and do a count. I've been trying
the COUNTIF function but without any luck. Example:
=COUNTIF(A1:A200,=12012008,<=12312008). I know this is completely wrong
but you get the idea. Thanks in advance. Jeremy.

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 Records Between Two Dates Stevo Excel Worksheet Functions 7 July 29th 08 03:03 PM
Excel - count the number of records between two specific dates. DK Excel Worksheet Functions 4 May 21st 08 03:08 PM
Counting a specific range of values within a column kenm Excel Discussion (Misc queries) 7 January 2nd 07 08:34 PM
How to copy records containing a specific date range to new sheet? Chrys Excel Worksheet Functions 1 January 30th 06 08:19 PM
Counting unique records based on date range aspAddict Excel Worksheet Functions 3 October 26th 05 08:12 PM


All times are GMT +1. The time now is 10:09 AM.

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"