Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4
Default COUNTIF coll A has x and Coll B has y

I can use the countif to check for coll. A having "x" =COUNTIF( A:A,"x") I
get 3. but I need to count how many rows also have "Y" in B
A B
x y
z y
x y
x k

in this case, I should get a answer of 2. Any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4,624
Default COUNTIF coll A has x and Coll B has y

One way:

=SUMPRODUCT(--(A1:A100="x"),--(B1:B100="y"))


If you're using XL07 or XL08:

=COUNTIFS(A:A,"x",B:B,"y")

In article ,
jimd wrote:

I can use the countif to check for coll. A having "x" =COUNTIF( A:A,"x") I
get 3. but I need to count how many rows also have "Y" in B
A B
x y
z y
x y
x k

in this case, I should get a answer of 2. Any suggestions?

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4
Default COUNTIF coll A has x and Coll B has y

Thanks, that worked as long as I didn't use A:A, A1:A100 works. must be the
range is too big.

"JE McGimpsey" wrote:

One way:

=SUMPRODUCT(--(A1:A100="x"),--(B1:B100="y"))


If you're using XL07 or XL08:

=COUNTIFS(A:A,"x",B:B,"y")

In article ,
jimd wrote:

I can use the countif to check for coll. A having "x" =COUNTIF( A:A,"x") I
get 3. but I need to count how many rows also have "Y" in B
A B
x y
z y
x y
x k

in this case, I should get a answer of 2. Any suggestions?


  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4,624
Default COUNTIF coll A has x and Coll B has y

Prior to XL07/08, SUMPRODUCT, like all other Array formulae (though you
don't need to use CTRL-SHIFT-ENTER), cannot be used on entire colums.

In article ,
jimd wrote:

Thanks, that worked as long as I didn't use A:A, A1:A100 works. must be the
range is too big.

  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,346
Default COUNTIF coll A has x and Coll B has y

Hi,

Just change the reference to read either A2:A65536 or A1:A65535. Just one
cell less than the entire column.

Or you can use the cludgy trick:
=SUMPRODUCT(--(A1:A65535=1))+SUMPRODUCT(--(A65536=1))

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"jimd" wrote:

Thanks, that worked as long as I didn't use A:A, A1:A100 works. must be the
range is too big.

"JE McGimpsey" wrote:

One way:

=SUMPRODUCT(--(A1:A100="x"),--(B1:B100="y"))


If you're using XL07 or XL08:

=COUNTIFS(A:A,"x",B:B,"y")

In article ,
jimd wrote:

I can use the countif to check for coll. A having "x" =COUNTIF( A:A,"x") I
get 3. but I need to count how many rows also have "Y" in B
A B
x y
z y
x y
x k

in this case, I should get a answer of 2. Any suggestions?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
function to find the row number of the maximum value in a coll josht Excel Worksheet Functions 0 January 23rd 07 06:25 PM
subtotals (85 coll): Is there an easyer way than ticking 85 boxes hopeful Excel Discussion (Misc queries) 2 April 22nd 06 01:29 PM
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") sctroy Excel Discussion (Misc queries) 2 September 25th 05 04:13 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM


All times are GMT +1. The time now is 11:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"