Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Naz Naz is offline
external usenet poster
 
Posts: 85
Default countif within date ranges

Im trying to count the number of entries for every month from a list of cells.
I've got the basic count if function but how do i tell it to count every
entry for jan 07?
Should i no be using countif?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default countif within date ranges

=SUMPRODUCT(--(YEAR(A2:A20)=2007),--(MONTH(A2:A20)=1))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"naz" wrote in message
...
Im trying to count the number of entries for every month from a list of
cells.
I've got the basic count if function but how do i tell it to count every
entry for jan 07?
Should i no be using countif?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default countif within date ranges

=countif(a:a,"="&date(2007,1,1)) - countif(a:a,""&date(2007,1,31))

Count the days larger than or equal to than Jan 1, 2007 and then subtract the
number of days larger than Jan 31, 2007.



naz wrote:

Im trying to count the number of entries for every month from a list of cells.
I've got the basic count if function but how do i tell it to count every
entry for jan 07?
Should i no be using countif?

Thanks


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Naz Naz is offline
external usenet poster
 
Posts: 85
Default countif within date ranges

Thanks bob but i cant get it to work im getting the #value! error and i dont
understand why...heres what im working with...

Date requested
01/01/07
02/01/07
01/02/07
02/02/07
31/12/06

raised in jan07 =
raised in feb 07 =

"Bob Phillips" wrote:

=SUMPRODUCT(--(YEAR(A2:A20)=2007),--(MONTH(A2:A20)=1))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"naz" wrote in message
...
Im trying to count the number of entries for every month from a list of
cells.
I've got the basic count if function but how do i tell it to count every
entry for jan 07?
Should i no be using countif?

Thanks




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default countif within date ranges

Works fine for me naz. Are the cells formatted as text? Is there an error in
one of the cells?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"naz" wrote in message
...
Thanks bob but i cant get it to work im getting the #value! error and i
dont
understand why...heres what im working with...

Date requested
01/01/07
02/01/07
01/02/07
02/02/07
31/12/06

raised in jan07 =
raised in feb 07 =

"Bob Phillips" wrote:

=SUMPRODUCT(--(YEAR(A2:A20)=2007),--(MONTH(A2:A20)=1))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"naz" wrote in message
...
Im trying to count the number of entries for every month from a list of
cells.
I've got the basic count if function but how do i tell it to count
every
entry for jan 07?
Should i no be using countif?

Thanks








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Naz Naz is offline
external usenet poster
 
Posts: 85
Default countif within date ranges

yup it was the format..many thanks

"Bob Phillips" wrote:

Works fine for me naz. Are the cells formatted as text? Is there an error in
one of the cells?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"naz" wrote in message
...
Thanks bob but i cant get it to work im getting the #value! error and i
dont
understand why...heres what im working with...

Date requested
01/01/07
02/01/07
01/02/07
02/02/07
31/12/06

raised in jan07 =
raised in feb 07 =

"Bob Phillips" wrote:

=SUMPRODUCT(--(YEAR(A2:A20)=2007),--(MONTH(A2:A20)=1))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"naz" wrote in message
...
Im trying to count the number of entries for every month from a list of
cells.
I've got the basic count if function but how do i tell it to count
every
entry for jan 07?
Should i no be using countif?

Thanks






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Naz Naz is offline
external usenet poster
 
Posts: 85
Default countif within date ranges

thats great, thanks dave

"Dave Peterson" wrote:

=countif(a:a,"="&date(2007,1,1)) - countif(a:a,""&date(2007,1,31))

Count the days larger than or equal to than Jan 1, 2007 and then subtract the
number of days larger than Jan 31, 2007.



naz wrote:

Im trying to count the number of entries for every month from a list of cells.
I've got the basic count if function but how do i tell it to count every
entry for jan 07?
Should i no be using countif?

Thanks


--

Dave Peterson

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
COUNTIF within date ranges Jock Charts and Charting in Excel 2 August 7th 07 09:06 AM
Countif with Dynamic date ranges. Leonhardtk Excel Worksheet Functions 2 July 12th 07 02:46 PM
Countif between ranges BSantos Excel Discussion (Misc queries) 1 February 15th 06 05:52 PM
CountIF and changing ranges dark Excel Worksheet Functions 3 October 2nd 05 06:17 AM
COUNTIF criteria using date ranges? Annie Excel Worksheet Functions 3 August 26th 05 07:25 PM


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