PC Review


Reply
Thread Tools Rate Thread

Compex COUNTIF

 
 
dave
Guest
Posts: n/a
 
      3rd Aug 2006
Is it possible to create a complex COUNTIF that will count the number
of rows in a range where, for each row, column A = 100 and column B is
greater than 5?

I realise that I could create a formula cell on each line that contains
the result of the evaluation for each line and base the COUNTIF on
that. However, I don't own the spreadsheet and that operation would not
be acceptable.

Thanks in advance.

Dave

 
Reply With Quote
 
 
 
 
Pete_UK
Guest
Posts: n/a
 
      3rd Aug 2006
You could try this array function* in a cell somewhere:

=SUM(IF((A1:A1000=100)*(B1:B1000)>5,1,0))

* As this is an array formula, then once you have typed it in (or
subsequently edit it) you will need to use CTRL-SHIFT-ENTER instead of
just ENTER. If you do this correctly, then Excel will wrap curly braces
{ } around the formula - you should not type these yourself.

Hope this helps - a SUMPRODUCT formula would also do this.

Pete

dave wrote:
> Is it possible to create a complex COUNTIF that will count the number
> of rows in a range where, for each row, column A = 100 and column B is
> greater than 5?
>
> I realise that I could create a formula cell on each line that contains
> the result of the evaluation for each line and base the COUNTIF on
> that. However, I don't own the spreadsheet and that operation would not
> be acceptable.
>
> Thanks in advance.
>
> Dave


 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      3rd Aug 2006
=SUMPRODUCT(--(A1:A1000=100),--(B1:B1000>5))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"dave" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is it possible to create a complex COUNTIF that will count the number
> of rows in a range where, for each row, column A = 100 and column B is
> greater than 5?
>
> I realise that I could create a formula cell on each line that contains
> the result of the evaluation for each line and base the COUNTIF on
> that. However, I don't own the spreadsheet and that operation would not
> be acceptable.
>
> Thanks in advance.
>
> Dave
>



 
Reply With Quote
 
dave
Guest
Posts: n/a
 
      3rd Aug 2006
Thanks for the help guys - I ended up using SUMPRODUCT.

BTW, why does each component require a prefix of "--" ?




Bob Phillips wrote:
> =SUMPRODUCT(--(A1:A1000=100),--(B1:B1000>5))
>
> --
> HTH
>
> Bob Phillips
>
> (replace somewhere in email address with gmail if mailing direct)
>
> "dave" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Is it possible to create a complex COUNTIF that will count the number
> > of rows in a range where, for each row, column A = 100 and column B is
> > greater than 5?
> >
> > I realise that I could create a formula cell on each line that contains
> > the result of the evaluation for each line and base the COUNTIF on
> > that. However, I don't own the spreadsheet and that operation would not
> > be acceptable.
> >
> > Thanks in advance.
> >
> > Dave
> >


 
Reply With Quote
 
dave
Guest
Posts: n/a
 
      3rd Aug 2006
Thanks for the help guys - I ended up using SUMPRODUCT.

BTW, why does each component require a prefix of "--" ?




Bob Phillips wrote:
> =SUMPRODUCT(--(A1:A1000=100),--(B1:B1000>5))
>
> --
> HTH
>
> Bob Phillips
>
> (replace somewhere in email address with gmail if mailing direct)
>
> "dave" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Is it possible to create a complex COUNTIF that will count the number
> > of rows in a range where, for each row, column A = 100 and column B is
> > greater than 5?
> >
> > I realise that I could create a formula cell on each line that contains
> > the result of the evaluation for each line and base the COUNTIF on
> > that. However, I don't own the spreadsheet and that operation would not
> > be acceptable.
> >
> > Thanks in advance.
> >
> > Dave
> >


 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      3rd Aug 2006
=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail here:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

dave wrote:
>
> Thanks for the help guys - I ended up using SUMPRODUCT.
>
> BTW, why does each component require a prefix of "--" ?
>
> Bob Phillips wrote:
> > =SUMPRODUCT(--(A1:A1000=100),--(B1:B1000>5))
> >
> > --
> > HTH
> >
> > Bob Phillips
> >
> > (replace somewhere in email address with gmail if mailing direct)
> >
> > "dave" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Is it possible to create a complex COUNTIF that will count the number
> > > of rows in a range where, for each row, column A = 100 and column B is
> > > greater than 5?
> > >
> > > I realise that I could create a formula cell on each line that contains
> > > the result of the evaluation for each line and base the COUNTIF on
> > > that. However, I don't own the spreadsheet and that operation would not
> > > be acceptable.
> > >
> > > Thanks in advance.
> > >
> > > Dave
> > >


--

Dave Peterson
 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      3rd Aug 2006
-- stuff?

We are supposed to surround it with a technical air of mystery, to make us
seem smart!

Bob

"Dave Peterson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> =sumproduct() likes to work with numbers. The -- stuff changes trues and

falses
> to 1's and 0's.
>
> Bob Phillips explains =sumproduct() in much more detail here:
> http://www.xldynamic.com/source/xld.SUMPRODUCT.html
>
> And J.E. McGimpsey has some notes at:
> http://mcgimpsey.com/excel/formulae/doubleneg.html
>
> dave wrote:
> >
> > Thanks for the help guys - I ended up using SUMPRODUCT.
> >
> > BTW, why does each component require a prefix of "--" ?
> >
> > Bob Phillips wrote:
> > > =SUMPRODUCT(--(A1:A1000=100),--(B1:B1000>5))
> > >
> > > --
> > > HTH
> > >
> > > Bob Phillips
> > >
> > > (replace somewhere in email address with gmail if mailing direct)
> > >
> > > "dave" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > Is it possible to create a complex COUNTIF that will count the

number
> > > > of rows in a range where, for each row, column A = 100 and column B

is
> > > > greater than 5?
> > > >
> > > > I realise that I could create a formula cell on each line that

contains
> > > > the result of the evaluation for each line and base the COUNTIF on
> > > > that. However, I don't own the spreadsheet and that operation would

not
> > > > be acceptable.
> > > >
> > > > Thanks in advance.
> > > >
> > > > Dave
> > > >

>
> --
>
> Dave Peterson



 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      3rd Aug 2006
It's the stuff that dreams are made of!

or...

Stuff that in your pipe and smoke it.

or...

Stuff the magic dragon, wait, that's not right.


Bob Phillips wrote:
>
> -- stuff?
>
> We are supposed to surround it with a technical air of mystery, to make us
> seem smart!
>
> Bob
>
> "Dave Peterson" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > =sumproduct() likes to work with numbers. The -- stuff changes trues and

> falses
> > to 1's and 0's.
> >
> > Bob Phillips explains =sumproduct() in much more detail here:
> > http://www.xldynamic.com/source/xld.SUMPRODUCT.html
> >
> > And J.E. McGimpsey has some notes at:
> > http://mcgimpsey.com/excel/formulae/doubleneg.html
> >
> > dave wrote:
> > >
> > > Thanks for the help guys - I ended up using SUMPRODUCT.
> > >
> > > BTW, why does each component require a prefix of "--" ?
> > >
> > > Bob Phillips wrote:
> > > > =SUMPRODUCT(--(A1:A1000=100),--(B1:B1000>5))
> > > >
> > > > --
> > > > HTH
> > > >
> > > > Bob Phillips
> > > >
> > > > (replace somewhere in email address with gmail if mailing direct)
> > > >
> > > > "dave" <(E-Mail Removed)> wrote in message
> > > > news:(E-Mail Removed)...
> > > > > Is it possible to create a complex COUNTIF that will count the

> number
> > > > > of rows in a range where, for each row, column A = 100 and column B

> is
> > > > > greater than 5?
> > > > >
> > > > > I realise that I could create a formula cell on each line that

> contains
> > > > > the result of the evaluation for each line and base the COUNTIF on
> > > > > that. However, I don't own the spreadsheet and that operation would

> not
> > > > > be acceptable.
> > > > >
> > > > > Thanks in advance.
> > > > >
> > > > > Dave
> > > > >

> >
> > --
> >
> > Dave Peterson


--

Dave Peterson
 
Reply With Quote
 
RagDyeR
Guest
Posts: n/a
 
      3rd Aug 2006
Don't let these guys fool you!

You *don't* need those unaries ( -- ).

This works just as well:

=SUMPRODUCT((A1:A1000=100)*(B1:B1000>5))

And with 4 *less* keystrokes.

Like they said, they like to make 'stuff' seem complicated.<bg>
--

Regards,

RD
----------------------------------------------------------------------------
-------------------
Please keep all correspondence within the Group, so all may benefit !
----------------------------------------------------------------------------
-------------------

"dave" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
Thanks for the help guys - I ended up using SUMPRODUCT.

BTW, why does each component require a prefix of "--" ?




Bob Phillips wrote:
> =SUMPRODUCT(--(A1:A1000=100),--(B1:B1000>5))
>
> --
> HTH
>
> Bob Phillips
>
> (replace somewhere in email address with gmail if mailing direct)
>
> "dave" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Is it possible to create a complex COUNTIF that will count the number
> > of rows in a range where, for each row, column A = 100 and column B is
> > greater than 5?
> >
> > I realise that I could create a formula cell on each line that contains
> > the result of the evaluation for each line and base the COUNTIF on
> > that. However, I don't own the spreadsheet and that operation would not
> > be acceptable.
> >
> > Thanks in advance.
> >
> > Dave
> >



 
Reply With Quote
 
Jay
Guest
Posts: n/a
 
      5th Aug 2006
The xldynamic page on SUMPRODUCT is excellent, although MAC users be
advised that the site will crash the Safari browser. I use Firefox when
referring to it.

Jason




Dave Peterson wrote:
> =sumproduct() likes to work with numbers. The -- stuff changes trues and falses
> to 1's and 0's.
>
> Bob Phillips explains =sumproduct() in much more detail here:
> http://www.xldynamic.com/source/xld.SUMPRODUCT.html
>
> And J.E. McGimpsey has some notes at:
> http://mcgimpsey.com/excel/formulae/doubleneg.html
>
> dave wrote:
>> Thanks for the help guys - I ended up using SUMPRODUCT.
>>
>> BTW, why does each component require a prefix of "--" ?
>>
>> Bob Phillips wrote:
>>> =SUMPRODUCT(--(A1:A1000=100),--(B1:B1000>5))
>>>
>>> --
>>> HTH
>>>
>>> Bob Phillips
>>>
>>> (replace somewhere in email address with gmail if mailing direct)
>>>
>>> "dave" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> Is it possible to create a complex COUNTIF that will count the number
>>>> of rows in a range where, for each row, column A = 100 and column B is
>>>> greater than 5?
>>>>
>>>> I realise that I could create a formula cell on each line that contains
>>>> the result of the evaluation for each line and base the COUNTIF on
>>>> that. However, I don't own the spreadsheet and that operation would not
>>>> be acceptable.
>>>>
>>>> Thanks in advance.
>>>>
>>>> Dave
>>>>

>

 
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
compex usb wireless lan adaptor =?Utf-8?B?RG9kZ2UwMw==?= Windows Vista Hardware 0 9th Jul 2006 04:39 AM
Compex RL2000 XP Drivers Kartik Windows XP Networking 0 14th May 2004 02:12 PM
Compex USB Network Adapter Ian News Editions 0 12th Oct 2002 12:14 PM
Compex Wireless WP11 and WLU11 Ian Feedback 0 12th Mar 2002 06:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:07 PM.