countif()

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

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,
 
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)
 
=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.
 
But only in XL2007.

--
HTH

Bob

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top