PC Review


Reply
Thread Tools Rate Thread

Countif help

 
 
jtfalk
Guest
Posts: n/a
 
      7th Aug 2009
I have a quick question. i am trying to count the cells with a date range. i
ceonverted the date to a value and tried this but it is not counting
correctly.

=SUM(COUNTIF(D6505,(AND(">=39995","<=40026"))))

There are 9 with the date 7-31-09 and 15 with 8-6-09. So it comes up with
zero - I know beacsue with the and it is true or false. How can I get it to
count between the 2 dates of >= 7-1-09 and < 8-1-09?

Thanks
 
Reply With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      7th Aug 2009
Use DATEVALUE()

Using COUNTIF
(all in one line
=COUNTIF(D6505,">="&DATEVALUE("01-jul-2009"))-COUNTIF(D6505,">="&DATEVALUE("01-AUG-2009"))

Using SUMPRODUCT
=SUMPRODUCT(--(--TEXT(D6505,"m")=7))


If this post helps click Yes
---------------
Jacob Skaria


"jtfalk" wrote:

> I have a quick question. i am trying to count the cells with a date range. i
> ceonverted the date to a value and tried this but it is not counting
> correctly.
>
> =SUM(COUNTIF(D6505,(AND(">=39995","<=40026"))))
>
> There are 9 with the date 7-31-09 and 15 with 8-6-09. So it comes up with
> zero - I know beacsue with the and it is true or false. How can I get it to
> count between the 2 dates of >= 7-1-09 and < 8-1-09?
>
> Thanks

 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      7th Aug 2009
Using SUMPRODUCT() with the year..

=SUMPRODUCT(--(TEXT(D6505,"mmyyyy")="072009"))

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

> Use DATEVALUE()
>
> Using COUNTIF
> (all in one line)
> =COUNTIF(D6505,">="&DATEVALUE("01-jul-2009"))-COUNTIF(D6505,">="&DATEVALUE("01-AUG-2009"))
>
> Using SUMPRODUCT
> =SUMPRODUCT(--(--TEXT(D6505,"m")=7))
>
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "jtfalk" wrote:
>
> > I have a quick question. i am trying to count the cells with a date range. i
> > ceonverted the date to a value and tried this but it is not counting
> > correctly.
> >
> > =SUM(COUNTIF(D6505,(AND(">=39995","<=40026"))))
> >
> > There are 9 with the date 7-31-09 and 15 with 8-6-09. So it comes up with
> > zero - I know beacsue with the and it is true or false. How can I get it to
> > count between the 2 dates of >= 7-1-09 and < 8-1-09?
> >
> > Thanks

 
Reply With Quote
 
ryguy7272
Guest
Posts: n/a
 
      7th Aug 2009
Sumproduct is one of my favorite functions! It can handle many different
arguments; it is very powerful!

http://www.lqnet.com/Excel/sumproduct.aspx
http://www.contextures.com/xlFunctio...tml#SumProduct
http://www.contextures.com/xlFunctio...tml#SumProduct

Learn it, and you will find many uses for it!!

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Jacob Skaria" wrote:

> Using SUMPRODUCT() with the year..
>
> =SUMPRODUCT(--(TEXT(D6505,"mmyyyy")="072009"))
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "Jacob Skaria" wrote:
>
> > Use DATEVALUE()
> >
> > Using COUNTIF
> > (all in one line)
> > =COUNTIF(D6505,">="&DATEVALUE("01-jul-2009"))-COUNTIF(D6505,">="&DATEVALUE("01-AUG-2009"))
> >
> > Using SUMPRODUCT
> > =SUMPRODUCT(--(--TEXT(D6505,"m")=7))
> >
> >
> > If this post helps click Yes
> > ---------------
> > Jacob Skaria
> >
> >
> > "jtfalk" wrote:
> >
> > > I have a quick question. i am trying to count the cells with a date range. i
> > > ceonverted the date to a value and tried this but it is not counting
> > > correctly.
> > >
> > > =SUM(COUNTIF(D6505,(AND(">=39995","<=40026"))))
> > >
> > > There are 9 with the date 7-31-09 and 15 with 8-6-09. So it comes up with
> > > zero - I know beacsue with the and it is true or false. How can I get it to
> > > count between the 2 dates of >= 7-1-09 and < 8-1-09?
> > >
> > > Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
COUNTIF is Off by 1 GooseMA Microsoft Excel Misc 4 8th Dec 2009 05:04 PM
Can I use COUNTIF with OR? AA Arens Microsoft Excel Discussion 3 20th Nov 2006 04:11 PM
How do I use a countif function according to two other countif fu. =?Utf-8?B?S2lyc3R5?= Microsoft Excel Worksheet Functions 2 20th Feb 2006 11:44 AM
COUNTIF or not to COUNTIF on a range in another sheet =?Utf-8?B?RWxsaWU=?= Microsoft Excel Worksheet Functions 4 15th Sep 2005 10:06 PM
COUNTIF in one colum then COUNTIF in another...??? =?Utf-8?B?Sm9ubmllUA==?= Microsoft Excel Worksheet Functions 3 22nd Feb 2005 02:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:01 PM.