PC Review


Reply
Thread Tools Rate Thread

COUNT(IF((,,,)) function

 
 
vjmc
Guest
Posts: n/a
 
      19th Jun 2008
hi all,

i am trying to duplicate the example in microsoft help about the
count(if((,,,)) function in my spreadsheet but it gives me false results.
below is the syntax i am using:

{=COUNT(IF((G2:G8000="12:00")*('Y2:Y8000<"180000"),Y2:Y8000))}

i am wondering if in my first argument G2:G800="12:00" would be processed as
i am trying to filter out my data with respect to time? i tried substituting
text within that column and the syntax gave me the needed results.

{=COUNT(IF((G2:G8000="test")*('Y2:Y8000<"180000"),Y2:Y8000))} = 3 (i put 3
entries of different values less than 180000)


so, bottom line, will using "time" as part of the syntax will work in this
particular scenario? thanks in advance...

vjmc
 
Reply With Quote
 
 
 
 
T. Valko
Guest
Posts: n/a
 
      19th Jun 2008
What does "12:00" represent? 12:00 AM or 12:00 PM ? If it's PM try this:

=SUMPRODUCT(--(G2:G8000=TIME(12,0,0)),--(Y2:Y8000<180000))

Note that if a cell in Y2:Y8000 is empty it will evaluate as being <180000
and could lead to incorrect results.

You can account for that by testing to make sure the cells do contain
numbers:

=SUMPRODUCT(--(G2:G8000=TIME(12,0,0)),--(ISNUMBER(Y2:Y8000)),--(Y2:Y8000<180000))

You can also shorten it a little and replace TIME(12,0,0) with 0.5. 12:00 PM
is equivalent to decimal 0.5.

=SUMPRODUCT(--(G2:G8000=0.5),--(ISNUMBER(Y2:Y8000)),--(Y2:Y8000<180000))


--
Biff
Microsoft Excel MVP


"vjmc" <(E-Mail Removed)> wrote in message
news:C383C51E-E94D-46BA-8C8D-(E-Mail Removed)...
> hi all,
>
> i am trying to duplicate the example in microsoft help about the
> count(if((,,,)) function in my spreadsheet but it gives me false results.
> below is the syntax i am using:
>
> {=COUNT(IF((G2:G8000="12:00")*('Y2:Y8000<"180000"),Y2:Y8000))}
>
> i am wondering if in my first argument G2:G800="12:00" would be processed
> as
> i am trying to filter out my data with respect to time? i tried
> substituting
> text within that column and the syntax gave me the needed results.
>
> {=COUNT(IF((G2:G8000="test")*('Y2:Y8000<"180000"),Y2:Y8000))} = 3 (i put
> 3
> entries of different values less than 180000)
>
>
> so, bottom line, will using "time" as part of the syntax will work in this
> particular scenario? thanks in advance...
>
> vjmc



 
Reply With Quote
 
vjmc
Guest
Posts: n/a
 
      19th Jun 2008
hi biff,

thanks for the feedback. what i am doing is, i am trying to filter out a
system generated statistics file in 30min intervals for 24hours. based on
your syntax given, this is an array right?

vlad

"T. Valko" wrote:

> What does "12:00" represent? 12:00 AM or 12:00 PM ? If it's PM try this:
>
> =SUMPRODUCT(--(G2:G8000=TIME(12,0,0)),--(Y2:Y8000<180000))
>
> Note that if a cell in Y2:Y8000 is empty it will evaluate as being <180000
> and could lead to incorrect results.
>
> You can account for that by testing to make sure the cells do contain
> numbers:
>
> =SUMPRODUCT(--(G2:G8000=TIME(12,0,0)),--(ISNUMBER(Y2:Y8000)),--(Y2:Y8000<180000))
>
> You can also shorten it a little and replace TIME(12,0,0) with 0.5. 12:00 PM
> is equivalent to decimal 0.5.
>
> =SUMPRODUCT(--(G2:G8000=0.5),--(ISNUMBER(Y2:Y8000)),--(Y2:Y8000<180000))
>
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "vjmc" <(E-Mail Removed)> wrote in message
> news:C383C51E-E94D-46BA-8C8D-(E-Mail Removed)...
> > hi all,
> >
> > i am trying to duplicate the example in microsoft help about the
> > count(if((,,,)) function in my spreadsheet but it gives me false results.
> > below is the syntax i am using:
> >
> > {=COUNT(IF((G2:G8000="12:00")*('Y2:Y8000<"180000"),Y2:Y8000))}
> >
> > i am wondering if in my first argument G2:G800="12:00" would be processed
> > as
> > i am trying to filter out my data with respect to time? i tried
> > substituting
> > text within that column and the syntax gave me the needed results.
> >
> > {=COUNT(IF((G2:G8000="test")*('Y2:Y8000<"180000"),Y2:Y8000))} = 3 (i put
> > 3
> > entries of different values less than 180000)
> >
> >
> > so, bottom line, will using "time" as part of the syntax will work in this
> > particular scenario? thanks in advance...
> >
> > vjmc

>
>
>

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      19th Jun 2008
>based on your syntax given, this is an array right?

Yes and no.

It's a formula that works on arrays but it doesn't have to be array entered
(CTRL, SHIFT, ENTER) but it'll work either way.

It COUNTS the instances where G2:G8000 = 12:00 PM and Y2:Y8000 <180000

--
Biff
Microsoft Excel MVP


"vjmc" <(E-Mail Removed)> wrote in message
news:5F524882-60A1-4BD2-B6BA-(E-Mail Removed)...
> hi biff,
>
> thanks for the feedback. what i am doing is, i am trying to filter out a
> system generated statistics file in 30min intervals for 24hours. based on
> your syntax given, this is an array right?
>
> vlad
>
> "T. Valko" wrote:
>
>> What does "12:00" represent? 12:00 AM or 12:00 PM ? If it's PM try this:
>>
>> =SUMPRODUCT(--(G2:G8000=TIME(12,0,0)),--(Y2:Y8000<180000))
>>
>> Note that if a cell in Y2:Y8000 is empty it will evaluate as being
>> <180000
>> and could lead to incorrect results.
>>
>> You can account for that by testing to make sure the cells do contain
>> numbers:
>>
>> =SUMPRODUCT(--(G2:G8000=TIME(12,0,0)),--(ISNUMBER(Y2:Y8000)),--(Y2:Y8000<180000))
>>
>> You can also shorten it a little and replace TIME(12,0,0) with 0.5. 12:00
>> PM
>> is equivalent to decimal 0.5.
>>
>> =SUMPRODUCT(--(G2:G8000=0.5),--(ISNUMBER(Y2:Y8000)),--(Y2:Y8000<180000))
>>
>>
>> --
>> Biff
>> Microsoft Excel MVP
>>
>>
>> "vjmc" <(E-Mail Removed)> wrote in message
>> news:C383C51E-E94D-46BA-8C8D-(E-Mail Removed)...
>> > hi all,
>> >
>> > i am trying to duplicate the example in microsoft help about the
>> > count(if((,,,)) function in my spreadsheet but it gives me false
>> > results.
>> > below is the syntax i am using:
>> >
>> > {=COUNT(IF((G2:G8000="12:00")*('Y2:Y8000<"180000"),Y2:Y8000))}
>> >
>> > i am wondering if in my first argument G2:G800="12:00" would be
>> > processed
>> > as
>> > i am trying to filter out my data with respect to time? i tried
>> > substituting
>> > text within that column and the syntax gave me the needed results.
>> >
>> > {=COUNT(IF((G2:G8000="test")*('Y2:Y8000<"180000"),Y2:Y8000))} = 3 (i
>> > put
>> > 3
>> > entries of different values less than 180000)
>> >
>> >
>> > so, bottom line, will using "time" as part of the syntax will work in
>> > this
>> > particular scenario? thanks in advance...
>> >
>> > vjmc

>>
>>
>>



 
Reply With Quote
 
vjmc
Guest
Posts: n/a
 
      19th Jun 2008
hi biff,

the syntax you gave is working. thanks a lot and i highly appreciate it!

best regards,

vlad

"T. Valko" wrote:

> >based on your syntax given, this is an array right?

>
> Yes and no.
>
> It's a formula that works on arrays but it doesn't have to be array entered
> (CTRL, SHIFT, ENTER) but it'll work either way.
>
> It COUNTS the instances where G2:G8000 = 12:00 PM and Y2:Y8000 <180000
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "vjmc" <(E-Mail Removed)> wrote in message
> news:5F524882-60A1-4BD2-B6BA-(E-Mail Removed)...
> > hi biff,
> >
> > thanks for the feedback. what i am doing is, i am trying to filter out a
> > system generated statistics file in 30min intervals for 24hours. based on
> > your syntax given, this is an array right?
> >
> > vlad
> >
> > "T. Valko" wrote:
> >
> >> What does "12:00" represent? 12:00 AM or 12:00 PM ? If it's PM try this:
> >>
> >> =SUMPRODUCT(--(G2:G8000=TIME(12,0,0)),--(Y2:Y8000<180000))
> >>
> >> Note that if a cell in Y2:Y8000 is empty it will evaluate as being
> >> <180000
> >> and could lead to incorrect results.
> >>
> >> You can account for that by testing to make sure the cells do contain
> >> numbers:
> >>
> >> =SUMPRODUCT(--(G2:G8000=TIME(12,0,0)),--(ISNUMBER(Y2:Y8000)),--(Y2:Y8000<180000))
> >>
> >> You can also shorten it a little and replace TIME(12,0,0) with 0.5. 12:00
> >> PM
> >> is equivalent to decimal 0.5.
> >>
> >> =SUMPRODUCT(--(G2:G8000=0.5),--(ISNUMBER(Y2:Y8000)),--(Y2:Y8000<180000))
> >>
> >>
> >> --
> >> Biff
> >> Microsoft Excel MVP
> >>
> >>
> >> "vjmc" <(E-Mail Removed)> wrote in message
> >> news:C383C51E-E94D-46BA-8C8D-(E-Mail Removed)...
> >> > hi all,
> >> >
> >> > i am trying to duplicate the example in microsoft help about the
> >> > count(if((,,,)) function in my spreadsheet but it gives me false
> >> > results.
> >> > below is the syntax i am using:
> >> >
> >> > {=COUNT(IF((G2:G8000="12:00")*('Y2:Y8000<"180000"),Y2:Y8000))}
> >> >
> >> > i am wondering if in my first argument G2:G800="12:00" would be
> >> > processed
> >> > as
> >> > i am trying to filter out my data with respect to time? i tried
> >> > substituting
> >> > text within that column and the syntax gave me the needed results.
> >> >
> >> > {=COUNT(IF((G2:G8000="test")*('Y2:Y8000<"180000"),Y2:Y8000))} = 3 (i
> >> > put
> >> > 3
> >> > entries of different values less than 180000)
> >> >
> >> >
> >> > so, bottom line, will using "time" as part of the syntax will work in
> >> > this
> >> > particular scenario? thanks in advance...
> >> >
> >> > vjmc
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      19th Jun 2008
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"vjmc" <(E-Mail Removed)> wrote in message
news:BFF68DE4-7BA7-4E4D-8D3B-(E-Mail Removed)...
> hi biff,
>
> the syntax you gave is working. thanks a lot and i highly appreciate it!
>
> best regards,
>
> vlad
>
> "T. Valko" wrote:
>
>> >based on your syntax given, this is an array right?

>>
>> Yes and no.
>>
>> It's a formula that works on arrays but it doesn't have to be array
>> entered
>> (CTRL, SHIFT, ENTER) but it'll work either way.
>>
>> It COUNTS the instances where G2:G8000 = 12:00 PM and Y2:Y8000 <180000
>>
>> --
>> Biff
>> Microsoft Excel MVP
>>
>>
>> "vjmc" <(E-Mail Removed)> wrote in message
>> news:5F524882-60A1-4BD2-B6BA-(E-Mail Removed)...
>> > hi biff,
>> >
>> > thanks for the feedback. what i am doing is, i am trying to filter out
>> > a
>> > system generated statistics file in 30min intervals for 24hours. based
>> > on
>> > your syntax given, this is an array right?
>> >
>> > vlad
>> >
>> > "T. Valko" wrote:
>> >
>> >> What does "12:00" represent? 12:00 AM or 12:00 PM ? If it's PM try
>> >> this:
>> >>
>> >> =SUMPRODUCT(--(G2:G8000=TIME(12,0,0)),--(Y2:Y8000<180000))
>> >>
>> >> Note that if a cell in Y2:Y8000 is empty it will evaluate as being
>> >> <180000
>> >> and could lead to incorrect results.
>> >>
>> >> You can account for that by testing to make sure the cells do contain
>> >> numbers:
>> >>
>> >> =SUMPRODUCT(--(G2:G8000=TIME(12,0,0)),--(ISNUMBER(Y2:Y8000)),--(Y2:Y8000<180000))
>> >>
>> >> You can also shorten it a little and replace TIME(12,0,0) with 0.5.
>> >> 12:00
>> >> PM
>> >> is equivalent to decimal 0.5.
>> >>
>> >> =SUMPRODUCT(--(G2:G8000=0.5),--(ISNUMBER(Y2:Y8000)),--(Y2:Y8000<180000))
>> >>
>> >>
>> >> --
>> >> Biff
>> >> Microsoft Excel MVP
>> >>
>> >>
>> >> "vjmc" <(E-Mail Removed)> wrote in message
>> >> news:C383C51E-E94D-46BA-8C8D-(E-Mail Removed)...
>> >> > hi all,
>> >> >
>> >> > i am trying to duplicate the example in microsoft help about the
>> >> > count(if((,,,)) function in my spreadsheet but it gives me false
>> >> > results.
>> >> > below is the syntax i am using:
>> >> >
>> >> > {=COUNT(IF((G2:G8000="12:00")*('Y2:Y8000<"180000"),Y2:Y8000))}
>> >> >
>> >> > i am wondering if in my first argument G2:G800="12:00" would be
>> >> > processed
>> >> > as
>> >> > i am trying to filter out my data with respect to time? i tried
>> >> > substituting
>> >> > text within that column and the syntax gave me the needed results.
>> >> >
>> >> > {=COUNT(IF((G2:G8000="test")*('Y2:Y8000<"180000"),Y2:Y8000))} = 3
>> >> > (i
>> >> > put
>> >> > 3
>> >> > entries of different values less than 180000)
>> >> >
>> >> >
>> >> > so, bottom line, will using "time" as part of the syntax will work
>> >> > in
>> >> > this
>> >> > particular scenario? thanks in advance...
>> >> >
>> >> > vjmc
>> >>
>> >>
>> >>

>>
>>
>>



 
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
Re: COUNT or IF Function Douglas J. Steele Microsoft Access 1 17th Aug 2009 08:17 PM
Can't use COUNT function to count.csv rows? Simon Microsoft Excel Programming 1 11th Jul 2008 04:59 PM
enter a count function to count records? Kimberly Microsoft Access Queries 11 14th May 2008 07:39 AM
count function =?Utf-8?B?TWFybHk=?= Microsoft Access Queries 5 20th Jul 2007 02:20 PM
I'm trying to use the function COUNT entered as =COUNT(C5:C22,">0. =?Utf-8?B?RXJpYyBBLg==?= Microsoft Excel Worksheet Functions 6 29th Sep 2004 10:02 PM


Features
 

Advertising
 

Newsgroups
 


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