PC Review


Reply
Thread Tools Rate Thread

Counting dates

 
 
Boylie
Guest
Posts: n/a
 
      20th Feb 2009
I am trying to count the number of dates in a list that are between two other
dates.

I tried this but it just gave zero:
=COUNTIF(C11:C23,AND( ">"& "G11","<"& "H11"))

Any advise?
 
Reply With Quote
 
 
 
 
Bernard Liengme
Guest
Posts: n/a
 
      20th Feb 2009
=COUNTIF(C11:C23,">"&G11) - COUNTIF(C11:C23,"<"&H11)

or

SUMPRODUCT(--(C11:C23>G11), --(C11:C23<H11) )

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Boylie" <(E-Mail Removed)> wrote in message
news:40F2254E-AC47-469D-9F55-(E-Mail Removed)...
>I am trying to count the number of dates in a list that are between two
>other
> dates.
>
> I tried this but it just gave zero:
> =COUNTIF(C11:C23,AND( ">"& "G11","<"& "H11"))
>
> Any advise?



 
Reply With Quote
 
Teethless mama
Guest
Posts: n/a
 
      20th Feb 2009
Nope, it doesn't work
> =COUNTIF(C11:C23,">"&G11) - COUNTIF(C11:C23,"<"&H11)


try like this:
=COUNTIF(C11:C23,">"&G11) - COUNTIF(C11:C23,">="&H11)



"Bernard Liengme" wrote:

> =COUNTIF(C11:C23,">"&G11) - COUNTIF(C11:C23,"<"&H11)
>
> or
>
> SUMPRODUCT(--(C11:C23>G11), --(C11:C23<H11) )
>
> best wishes
> --
> Bernard V Liengme
> Microsoft Excel MVP
> http://people.stfx.ca/bliengme
> remove caps from email
>
> "Boylie" <(E-Mail Removed)> wrote in message
> news:40F2254E-AC47-469D-9F55-(E-Mail Removed)...
> >I am trying to count the number of dates in a list that are between two
> >other
> > dates.
> >
> > I tried this but it just gave zero:
> > =COUNTIF(C11:C23,AND( ">"& "G11","<"& "H11"))
> >
> > Any advise?

>
>
>

 
Reply With Quote
 
Shane Devenshire
Guest
Posts: n/a
 
      20th Feb 2009
Hi,

In 2007:

=COUNTIFS(C11:C23, ">"& G11,C11:C23,"<"& H11)

or in all versions another variation of the SUMPRODUCT:

=SUMPRODUCT((C11:C23>G11)*(C11:C23<H11))

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Boylie" wrote:

> I am trying to count the number of dates in a list that are between two other
> dates.
>
> I tried this but it just gave zero:
> =COUNTIF(C11:C23,AND( ">"& "G11","<"& "H11"))
>
> Any advise?

 
Reply With Quote
 
Bernard Liengme
Guest
Posts: n/a
 
      20th Feb 2009
Yes, that was foolish of me!
Thanks
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Teethless mama" <(E-Mail Removed)> wrote in message
news:56D7C8BF-7DB1-4083-B0A9-(E-Mail Removed)...
> Nope, it doesn't work
>> =COUNTIF(C11:C23,">"&G11) - COUNTIF(C11:C23,"<"&H11)

>
> try like this:
> =COUNTIF(C11:C23,">"&G11) - COUNTIF(C11:C23,">="&H11)
>
>
>
> "Bernard Liengme" wrote:
>
>> =COUNTIF(C11:C23,">"&G11) - COUNTIF(C11:C23,"<"&H11)
>>
>> or
>>
>> SUMPRODUCT(--(C11:C23>G11), --(C11:C23<H11) )
>>
>> best wishes
>> --
>> Bernard V Liengme
>> Microsoft Excel MVP
>> http://people.stfx.ca/bliengme
>> remove caps from email
>>
>> "Boylie" <(E-Mail Removed)> wrote in message
>> news:40F2254E-AC47-469D-9F55-(E-Mail Removed)...
>> >I am trying to count the number of dates in a list that are between two
>> >other
>> > dates.
>> >
>> > I tried this but it just gave zero:
>> > =COUNTIF(C11:C23,AND( ">"& "G11","<"& "H11"))
>> >
>> > Any advise?

>>
>>
>>



 
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
Counting dates Beth McLaren Microsoft Access Getting Started 1 30th Jun 2009 09:33 PM
Counting dates between 2 dates (No weekends) Sandra Microsoft Access Queries 5 28th Feb 2008 09:19 PM
counting occasions dates occur between 2 dates =?Utf-8?B?aG95dA==?= Microsoft Excel New Users 5 16th Jun 2006 08:11 AM
Counting dates, within a list of dates =?Utf-8?B?anJoZWluc2NobQ==?= Microsoft Excel Worksheet Functions 7 19th Apr 2006 06:13 PM
Excel: counting cells which have dates between specified dates Jacqueline Microsoft Excel Misc 2 11th Aug 2004 12:15 PM


Features
 

Advertising
 

Newsgroups
 


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