Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default CountIf for multiple columns

I am trying to collect the number of letters in a column that also have a
letter in another column.

Here is what I am trying to do:
I would like to combine to combine the two formulas below
countif(C21:C206,"Y") and countif(G21:G206,"E")

In other words, I would like a target cell to sum the number of rows that
have a "Y" in Column C and a "E" in Column G. Is this possible?

Thank you for your help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default CountIf for multiple columns

=sumproduct(--(c21:c206="y"),--(g21:g206="e"))

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=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 he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

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



John English wrote:

I am trying to collect the number of letters in a column that also have a
letter in another column.

Here is what I am trying to do:
I would like to combine to combine the two formulas below
countif(C21:C206,"Y") and countif(G21:G206,"E")

In other words, I would like a target cell to sum the number of rows that
have a "Y" in Column C and a "E" in Column G. Is this possible?

Thank you for your help.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default CountIf for multiple columns

Thank you sir that did the trick.

"Dave Peterson" wrote:

=sumproduct(--(c21:c206="y"),--(g21:g206="e"))

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=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 he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

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



John English wrote:

I am trying to collect the number of letters in a column that also have a
letter in another column.

Here is what I am trying to do:
I would like to combine to combine the two formulas below
countif(C21:C206,"Y") and countif(G21:G206,"E")

In other words, I would like a target cell to sum the number of rows that
have a "Y" in Column C and a "E" in Column G. Is this possible?

Thank you for your help.


--

Dave Peterson

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
COUNTIF in between rows Vasilis Tergen Excel Worksheet Functions 20 January 13th 07 10:22 PM
How Do I use COUNTIF Combining the Text from 2 Columns Kevin Excel Worksheet Functions 7 March 19th 06 05:36 PM
can countif function look at 2 separate columns for criteria blake7 Excel Worksheet Functions 2 March 16th 06 08:07 PM
Combining IF and COUNTIF based on two columns maxtrixx Excel Discussion (Misc queries) 5 March 31st 05 06:21 PM
Using COUNTIF to check values in multiple columns DTomSimpson Excel Worksheet Functions 2 March 29th 05 04:47 AM


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

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

About Us

"It's about Microsoft Excel"