Microsoft Office Forums


Reply
Thread Tools Display Modes

Countif using a cell reference as range

 
 
J.W. Aldridge
Guest
Posts: n/a

 
      08-07-2008, 09:16 PM
=COUNTIF(formalin_count,"<=d$2")

formalin_count consist of a string of times (F6:F64999)
ie 07:00 - 19:00

d2 consist of a time (the end/max time). (18:00)

I am trying to get the count of instances up until the time given in
D2.

The question is how to get this to read the reference D$2 ?

thanx


 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a

 
      08-07-2008, 09:24 PM
try this idea
=COUNTIF(A:A,"<" &d2)

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"J.W. Aldridge" <(E-Mail Removed)> wrote in message
news:3dc06f0b-cc5b-4899-9d0e-(E-Mail Removed)...
> =COUNTIF(formalin_count,"<=d$2")
>
> formalin_count consist of a string of times (F6:F64999)
> ie 07:00 - 19:00
>
> d2 consist of a time (the end/max time). (18:00)
>
> I am trying to get the count of instances up until the time given in
> D2.
>
> The question is how to get this to read the reference D$2 ?
>
> thanx
>
>


 
Reply With Quote
 
T. Valko
Guest
Posts: n/a

 
      08-07-2008, 09:31 PM
>=COUNTIF(formalin_count,"<=d$2")

Try it like this:

=COUNTIF(formalin_count,"<="&D$2)

--
Biff
Microsoft Excel MVP


"J.W. Aldridge" <(E-Mail Removed)> wrote in message
news:3dc06f0b-cc5b-4899-9d0e-(E-Mail Removed)...
> =COUNTIF(formalin_count,"<=d$2")
>
> formalin_count consist of a string of times (F6:F64999)
> ie 07:00 - 19:00
>
> d2 consist of a time (the end/max time). (18:00)
>
> I am trying to get the count of instances up until the time given in
> D2.
>
> The question is how to get this to read the reference D$2 ?
>
> thanx
>
>



 
Reply With Quote
 
Pete_UK
Guest
Posts: n/a

 
      08-07-2008, 09:31 PM
Do you mean that you want to count if the time in D2 falls within the
range of times in each cell in formalin_count? What if the time is
equal to the end time in the range? Presumably if the range is 18:00 -
21:00 this would not count?

Pete

On Aug 7, 10:16*pm, "J.W. Aldridge" <jeremy.w.aldri...@gmail.com>
wrote:
> =COUNTIF(formalin_count,"<=d$2")
>
> formalin_count consist of a string of times (F6:F64999)
> ie *07:00 - 19:00
>
> d2 consist of a time (the end/max time). (18:00)
>
> I am trying to get the count of instances up until the time given in
> D2.
>
> The question is how to get this to read the reference D$2 ?
>
> thanx


 
Reply With Quote
 
Infinitogool
Guest
Posts: n/a

 
      08-07-2008, 09:32 PM
Hi J.W. Aldridge

Try something like this:
=COUNTIF(formalin_count,"<="&d$2)

Regards,
Pedro J.

> =COUNTIF(formalin_count,"<=d$2")
>
> formalin_count consist of a string of times (F6:F64999)
> ie 07:00 - 19:00
>
> d2 consist of a time (the end/max time). (18:00)
>
> I am trying to get the count of instances up until the time given in
> D2.
>
> The question is how to get this to read the reference D$2 ?
>
> thanx
>
>

 
Reply With Quote
 
J.W. Aldridge
Guest
Posts: n/a

 
      08-07-2008, 10:04 PM
This one worked!

=COUNTIF(formalin_count,"<="&D$2)



Thanx ALL!
 
Reply With Quote
 
Pete_UK
Guest
Posts: n/a

 
      08-07-2008, 10:10 PM
If F6, the first cell in the range formalin_count, contains "07:00 -
19:00" (i.e. a text value) and D2 contains 18:00 (a time value) then
you won't be able to use COUNTIF directly. You'll have to extract the
start and end times out of F6 and then see if D2 is within the range
(if that's what you are trying to do - see my earlier questions). This
will probably be a sumproduct formula.

Pete

On Aug 7, 10:16*pm, "J.W. Aldridge" <jeremy.w.aldri...@gmail.com>
wrote:
> =COUNTIF(formalin_count,"<=d$2")
>
> formalin_count consist of a string of times (F6:F64999)
> ie *07:00 - 19:00
>
> d2 consist of a time (the end/max time). (18:00)
>
> I am trying to get the count of instances up until the time given in
> D2.
>
> The question is how to get this to read the reference D$2 ?
>
> thanx


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell Value as Named Range Reference stephen.h.dow@gmail.com Excel Newsgroup 1 07-28-2008 05:58 PM
Using cell value in range reference Sandy Excel Newsgroup 6 02-19-2008 06:59 AM
Use of '=AND( COUNTIF(A:A, B1))' to check if a cell is in a column or range sillyhat@yahoo.com Excel Newsgroup 2 05-23-2006 07:20 PM
use cell reference for named range elf21 Excel Newsgroup 5 02-20-2006 12:32 AM
COUNTIF - Cell reference Fredrik Excel Newsgroup 3 09-24-2003 03:16 PM



All times are GMT. The time now is 02:18 PM.