PC Review


Reply
Thread Tools Rate Thread

Count if Dates are!

 
 
Jman
Guest
Posts: n/a
 
      5th Apr 2008
In sheet 1 i have
C1 to C30000 "dates.
4/30/08
3/10/08
3/04/08
1/03/05
3/16/08
ect

In sheet 2


I have
A1: this date 3/1/08
A2: this date 3/15/08

I want a formula in C5 that will look into sheet one and see if any dates i
i put in A:1 to A3000 falls on or in between the dates in sheet 2. "3/1/08"
and " 3/15/08"
and if so.. to count as 1

From the example above the aswer that i am lookin for should be 2 since
there are only two dates that fall in between and they are 3/10/08
3/04/08

 
Reply With Quote
 
 
 
 
T. Valko
Guest
Posts: n/a
 
      5th Apr 2008
Try this:

=COUNTIF(C1:C3000,">="&Sheet2!A1)-COUNTIF(C1:C3000,">"&Sheet2!A2)

Format as GENERAL or NUMBER

--
Biff
Microsoft Excel MVP


"Jman" <(E-Mail Removed)> wrote in message
news:54E9CF7A-11B4-40FB-A81D-(E-Mail Removed)...
> In sheet 1 i have
> C1 to C30000 "dates.
> 4/30/08
> 3/10/08
> 3/04/08
> 1/03/05
> 3/16/08
> ect
>
> In sheet 2
>
>
> I have
> A1: this date 3/1/08
> A2: this date 3/15/08
>
> I want a formula in C5 that will look into sheet one and see if any dates
> i
> i put in A:1 to A3000 falls on or in between the dates in sheet 2.
> "3/1/08"
> and " 3/15/08"
> and if so.. to count as 1
>
> From the example above the aswer that i am lookin for should be 2 since
> there are only two dates that fall in between and they are 3/10/08
> 3/04/08
>



 
Reply With Quote
 
Fred Smith
Guest
Posts: n/a
 
      5th Apr 2008
As I read it, all dates between 3/1/08 and 3/15/08 are to count as 1. So
count them as zero and add one at the end. Your formula would then look
like:

(Dates < 3/1/08) + (Dates > 3/15/08) + 1
=countif(c1:c3000,"<"&a1)+countif(c1:c3000,">"&a2)+1

If you're looking to count *only* the dates between a1 and a2, you want:

=count(c1:c3000)-countif(c1:c3000,"<"&a1)-countif(c1:c3000,">"&a2)

Does this help?

Regards,
Fred.

"Jman" <(E-Mail Removed)> wrote in message
news:54E9CF7A-11B4-40FB-A81D-(E-Mail Removed)...
> In sheet 1 i have
> C1 to C30000 "dates.
> 4/30/08
> 3/10/08
> 3/04/08
> 1/03/05
> 3/16/08
> ect
>
> In sheet 2
>
>
> I have
> A1: this date 3/1/08
> A2: this date 3/15/08
>
> I want a formula in C5 that will look into sheet one and see if any dates
> i
> i put in A:1 to A3000 falls on or in between the dates in sheet 2.
> "3/1/08"
> and " 3/15/08"
> and if so.. to count as 1
>
> From the example above the aswer that i am lookin for should be 2 since
> there are only two dates that fall in between and they are 3/10/08
> 3/04/08
>


 
Reply With Quote
 
Jman
Guest
Posts: n/a
 
      5th Apr 2008
Exactly what i wanted.
Thanks.

"T. Valko" wrote:

> Try this:
>
> =COUNTIF(C1:C3000,">="&Sheet2!A1)-COUNTIF(C1:C3000,">"&Sheet2!A2)
>
> Format as GENERAL or NUMBER
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "Jman" <(E-Mail Removed)> wrote in message
> news:54E9CF7A-11B4-40FB-A81D-(E-Mail Removed)...
> > In sheet 1 i have
> > C1 to C30000 "dates.
> > 4/30/08
> > 3/10/08
> > 3/04/08
> > 1/03/05
> > 3/16/08
> > ect
> >
> > In sheet 2
> >
> >
> > I have
> > A1: this date 3/1/08
> > A2: this date 3/15/08
> >
> > I want a formula in C5 that will look into sheet one and see if any dates
> > i
> > i put in A:1 to A3000 falls on or in between the dates in sheet 2.
> > "3/1/08"
> > and " 3/15/08"
> > and if so.. to count as 1
> >
> > From the example above the aswer that i am lookin for should be 2 since
> > there are only two dates that fall in between and they are 3/10/08
> > 3/04/08
> >

>
>
>

 
Reply With Quote
 
Jman
Guest
Posts: n/a
 
      5th Apr 2008

Thanks for your reply.
"Fred Smith" wrote:

> As I read it, all dates between 3/1/08 and 3/15/08 are to count as 1. So
> count them as zero and add one at the end. Your formula would then look
> like:
>
> (Dates < 3/1/08) + (Dates > 3/15/08) + 1
> =countif(c1:c3000,"<"&a1)+countif(c1:c3000,">"&a2)+1
>
> If you're looking to count *only* the dates between a1 and a2, you want:
>
> =count(c1:c3000)-countif(c1:c3000,"<"&a1)-countif(c1:c3000,">"&a2)
>
> Does this help?
>
> Regards,
> Fred.
>
> "Jman" <(E-Mail Removed)> wrote in message
> news:54E9CF7A-11B4-40FB-A81D-(E-Mail Removed)...
> > In sheet 1 i have
> > C1 to C30000 "dates.
> > 4/30/08
> > 3/10/08
> > 3/04/08
> > 1/03/05
> > 3/16/08
> > ect
> >
> > In sheet 2
> >
> >
> > I have
> > A1: this date 3/1/08
> > A2: this date 3/15/08
> >
> > I want a formula in C5 that will look into sheet one and see if any dates
> > i
> > i put in A:1 to A3000 falls on or in between the dates in sheet 2.
> > "3/1/08"
> > and " 3/15/08"
> > and if so.. to count as 1
> >
> > From the example above the aswer that i am lookin for should be 2 since
> > there are only two dates that fall in between and they are 3/10/08
> > 3/04/08
> >

>
>

 
Reply With Quote
 
Mike
Guest
Posts: n/a
 
      5th Apr 2008
Maybe this will help
=TEXT(COUNTIF(Sheet1!C1:C3000,">="&A1)-COUNTIF(Sheet1!C1:C3000,">"&A2),0)

"T. Valko" wrote:

> Try this:
>
> =COUNTIF(C1:C3000,">="&Sheet2!A1)-COUNTIF(C1:C3000,">"&Sheet2!A2)
>
> Format as GENERAL or NUMBER
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "Jman" <(E-Mail Removed)> wrote in message
> news:54E9CF7A-11B4-40FB-A81D-(E-Mail Removed)...
> > In sheet 1 i have
> > C1 to C30000 "dates.
> > 4/30/08
> > 3/10/08
> > 3/04/08
> > 1/03/05
> > 3/16/08
> > ect
> >
> > In sheet 2
> >
> >
> > I have
> > A1: this date 3/1/08
> > A2: this date 3/15/08
> >
> > I want a formula in C5 that will look into sheet one and see if any dates
> > i
> > i put in A:1 to A3000 falls on or in between the dates in sheet 2.
> > "3/1/08"
> > and " 3/15/08"
> > and if so.. to count as 1
> >
> > From the example above the aswer that i am lookin for should be 2 since
> > there are only two dates that fall in between and they are 3/10/08
> > 3/04/08
> >

>
>
>

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      5th Apr 2008
You're welcome!

Now, let's get that other question solved!

--
Biff
Microsoft Excel MVP


"Jman" <(E-Mail Removed)> wrote in message
news:7017E38B-728E-476C-89B9-(E-Mail Removed)...
> Exactly what i wanted.
> Thanks.
>
> "T. Valko" wrote:
>
>> Try this:
>>
>> =COUNTIF(C1:C3000,">="&Sheet2!A1)-COUNTIF(C1:C3000,">"&Sheet2!A2)
>>
>> Format as GENERAL or NUMBER
>>
>> --
>> Biff
>> Microsoft Excel MVP
>>
>>
>> "Jman" <(E-Mail Removed)> wrote in message
>> news:54E9CF7A-11B4-40FB-A81D-(E-Mail Removed)...
>> > In sheet 1 i have
>> > C1 to C30000 "dates.
>> > 4/30/08
>> > 3/10/08
>> > 3/04/08
>> > 1/03/05
>> > 3/16/08
>> > ect
>> >
>> > In sheet 2
>> >
>> >
>> > I have
>> > A1: this date 3/1/08
>> > A2: this date 3/15/08
>> >
>> > I want a formula in C5 that will look into sheet one and see if any
>> > dates
>> > i
>> > i put in A:1 to A3000 falls on or in between the dates in sheet 2.
>> > "3/1/08"
>> > and " 3/15/08"
>> > and if so.. to count as 1
>> >
>> > From the example above the aswer that i am lookin for should be 2 since
>> > there are only two dates that fall in between and they are 3/10/08
>> > 3/04/08
>> >

>>
>>
>>



 
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
Count Occurences of Dates Between Two Dates EMB369 Microsoft Excel Worksheet Functions 0 25th Mar 2010 11:49 AM
Count Dates between Dates exclude Text Ken Microsoft Excel Misc 3 8th Apr 2009 07:59 PM
I want to count the total Number of dates between two dates How? seshu Microsoft Excel Worksheet Functions 3 7th Feb 2008 05:41 PM
need to convert list of dates to count no. of dates by week neowok Microsoft Excel Worksheet Functions 13 30th Jan 2006 03:54 PM
How do I get a number count of dates that fall between specific dates JohnB Microsoft Excel Discussion 3 3rd Jun 2004 03:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:16 AM.