PC Review


Reply
Thread Tools Rate Thread

Countif with parameters from another range?

 
 
=?Utf-8?B?S2FpIEN1bm5pbmdoYW0=?=
Guest
Posts: n/a
 
      16th Jul 2007
I need to count the instances on the word "Trane" in a range of cells, but
base the countif statement on the information in another range of cells. If
the parameter range has a "N" in it, then count the corresponding cell in the
counting range with "Trane" in it. If not, don't count it. This needs to be
a formula entered in one cell that displays the results of the countif. I
have tried this formula:
=COUNT(IF(($A$2:$A$297="N")*($O$2:$O$297="Trane"),$O$2:$O$297))
that is shown in the help section, but it only returns zeros when I use it.
Any help would be greatly appreciated!
-Kai
 
Reply With Quote
 
 
 
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      16th Jul 2007
>I need to count the instances on the word "Trane" in a range of cells, but
> base the countif statement on the information in another range of cells.
> If
> the parameter range has a "N" in it, then count the corresponding cell in
> the
> counting range with "Trane" in it. If not, don't count it. This needs to
> be
> a formula entered in one cell that displays the results of the countif. I
> have tried this formula:
> =COUNT(IF(($A$2:$A$297="N")*($O$2:$O$297="Trane"),$O$2:$O$297))
> that is shown in the help section, but it only returns zeros when I use
> it.
> Any help would be greatly appreciated!


Give this formula a try...

=SUMPRODUCT(--($A$2:$A$297="N"),--($O$2:$O$297="Trane"))

Rick

 
Reply With Quote
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      16th Jul 2007
You can do it with SumProduct... check out this link.

http://www.xldynamic.com/source/xld.SUMPRODUCT.html
--
HTH...

Jim Thomlinson


"Kai Cunningham" wrote:

> I need to count the instances on the word "Trane" in a range of cells, but
> base the countif statement on the information in another range of cells. If
> the parameter range has a "N" in it, then count the corresponding cell in the
> counting range with "Trane" in it. If not, don't count it. This needs to be
> a formula entered in one cell that displays the results of the countif. I
> have tried this formula:
> =COUNT(IF(($A$2:$A$297="N")*($O$2:$O$297="Trane"),$O$2:$O$297))
> that is shown in the help section, but it only returns zeros when I use it.
> Any help would be greatly appreciated!
> -Kai

 
Reply With Quote
 
=?Utf-8?B?VmVyZ2VsIEFkcmlhbm8=?=
Guest
Posts: n/a
 
      16th Jul 2007
Kai,

Here's one way:

=SUMPRODUCT(($A$2:$A$297="N")*($O$2:$O$297="Trane"))


--
Hope that helps.

Vergel Adriano


"Kai Cunningham" wrote:

> I need to count the instances on the word "Trane" in a range of cells, but
> base the countif statement on the information in another range of cells. If
> the parameter range has a "N" in it, then count the corresponding cell in the
> counting range with "Trane" in it. If not, don't count it. This needs to be
> a formula entered in one cell that displays the results of the countif. I
> have tried this formula:
> =COUNT(IF(($A$2:$A$297="N")*($O$2:$O$297="Trane"),$O$2:$O$297))
> that is shown in the help section, but it only returns zeros when I use it.
> Any help would be greatly appreciated!
> -Kai

 
Reply With Quote
 
=?Utf-8?B?S2FpIEN1bm5pbmdoYW0=?=
Guest
Posts: n/a
 
      16th Jul 2007
Thanks a ton for the quick responses! Worked like a charm!
-Kai

"Vergel Adriano" wrote:

> Kai,
>
> Here's one way:
>
> =SUMPRODUCT(($A$2:$A$297="N")*($O$2:$O$297="Trane"))
>
>
> --
> Hope that helps.
>
> Vergel Adriano
>
>
> "Kai Cunningham" wrote:
>
> > I need to count the instances on the word "Trane" in a range of cells, but
> > base the countif statement on the information in another range of cells. If
> > the parameter range has a "N" in it, then count the corresponding cell in the
> > counting range with "Trane" in it. If not, don't count it. This needs to be
> > a formula entered in one cell that displays the results of the countif. I
> > have tried this formula:
> > =COUNT(IF(($A$2:$A$297="N")*($O$2:$O$297="Trane"),$O$2:$O$297))
> > that is shown in the help section, but it only returns zeros when I use it.
> > Any help would be greatly appreciated!
> > -Kai

 
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
COUNTIF to compare one range versus another range Phil Microsoft Excel Programming 3 30th May 2007 10:39 PM
Countif between a range? =?Utf-8?B?S2VlcHJvZ29hbA==?= Microsoft Excel Worksheet Functions 1 21st Jun 2006 11:14 PM
countif - I want to enter 2 parameters - how? =?Utf-8?B?TmFuY3lQMTky?= Microsoft Excel Programming 2 2nd Feb 2006 05:43 PM
COUNTIF or not to COUNTIF on a range in another sheet =?Utf-8?B?RWxsaWU=?= Microsoft Excel Worksheet Functions 4 15th Sep 2005 10:06 PM
Count cells in one range based on parameters in another range =?Utf-8?B?ZGF2ZSByb3Ro?= Microsoft Excel Worksheet Functions 2 29th Mar 2005 05:33 PM


Features
 

Advertising
 

Newsgroups
 


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