#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default countif()

Hi everyone, I'm trying to use the countif() to count if (naturually) a date
falls into a certain range. But when I put in wild cards (to account for
different time stamps) it doesn't count... I don't get it?

Cheers,
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default countif()

Because a date is just a number, and what you see is not what is held -
today's date is 29561 for instance.

You need to be more obtuse

test for Jan 2008

=SUMPRODUCT(--(MONTH(A2:A200)=1),--(YEAR(A2:A200)=2008))

test between 15th Jan and 15th Feb

=SUMPRODUCT(--(A2:A200=--"2008-01-15")),--(A2:A200<--"2008-02-15"))

and so on

--
HTH

Bob

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

"Mike" wrote in message
...
Hi everyone, I'm trying to use the countif() to count if (naturually) a
date
falls into a certain range. But when I put in wild cards (to account for
different time stamps) it doesn't count... I don't get it?

Cheers,



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default countif()

=COUNTIFS(B8:B19,"=4/1/2008",B8:B19,"<=4/18/2008")

Countifs will give you the opportunity to set more than 1 criteria. In the
example above, the range of cells with dates is B8:B19 and the result will be
the total number of dates that meet the 2 criteria. The equal sign is only
to say greater than OR equal to.

The date format is month/date/year in the example also.

"Mike" wrote:

Hi everyone, I'm trying to use the countif() to count if (naturually) a date
falls into a certain range. But when I put in wild cards (to account for
different time stamps) it doesn't count... I don't get it?

Cheers,

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default countif()

But only in XL2007.

--
HTH

Bob

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

"Brad Vogt" wrote in message
...
=COUNTIFS(B8:B19,"=4/1/2008",B8:B19,"<=4/18/2008")

Countifs will give you the opportunity to set more than 1 criteria. In
the
example above, the range of cells with dates is B8:B19 and the result will
be
the total number of dates that meet the 2 criteria. The equal sign is
only
to say greater than OR equal to.

The date format is month/date/year in the example also.

"Mike" wrote:

Hi everyone, I'm trying to use the countif() to count if (naturually) a
date
falls into a certain range. But when I put in wild cards (to account for
different time stamps) it doesn't count... I don't get it?

Cheers,



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
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") sctroy Excel Discussion (Misc queries) 2 September 25th 05 04:13 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
Help with a COUNTIF, Please Marty Excel Worksheet Functions 13 May 23rd 05 12:14 AM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM


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