Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default countif for multiple criteria?

Hi All,

Is there a way to count only if both conditions are met? for example, count
only if column E contains "*bat*" and column K contains "*yes*", otherwise
don't count it.

any suggestion?

thanks,
Tracktraining
--
Learning
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default countif for multiple criteria?

Any time you need multiple criteria, think SUMPRODUCT()

=SUMPRODUCT((E1:E100="*bat*")*(K1:K100="*yes*"))

see:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
for the complete story.

--
Gary''s Student - gsnu200836


"tracktraining" wrote:

Hi All,

Is there a way to count only if both conditions are met? for example, count
only if column E contains "*bat*" and column K contains "*yes*", otherwise
don't count it.

any suggestion?

thanks,
Tracktraining
--
Learning

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default countif for multiple criteria?

Try

=COUNT(IF(ISNUMBER(SEARCH("BAT",E1:E13)),IF(ISNUMB ER(SEARCH("YES",K1:K13)),1)))

'This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correctly then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array

Mike



"tracktraining" wrote:

Hi All,

Is there a way to count only if both conditions are met? for example, count
only if column E contains "*bat*" and column K contains "*yes*", otherwise
don't count it.

any suggestion?

thanks,
Tracktraining
--
Learning

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default countif for multiple criteria?

Sumproduct and wildcards!! tested?

"Gary''s Student" wrote:

Any time you need multiple criteria, think SUMPRODUCT()

=SUMPRODUCT((E1:E100="*bat*")*(K1:K100="*yes*"))

see:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
for the complete story.

--
Gary''s Student - gsnu200836


"tracktraining" wrote:

Hi All,

Is there a way to count only if both conditions are met? for example, count
only if column E contains "*bat*" and column K contains "*yes*", otherwise
don't count it.

any suggestion?

thanks,
Tracktraining
--
Learning

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,276
Default countif for multiple criteria?

Hi
try

=COUNTIF(e2:e15,"Bat")-COUNTIF(k2:k15,"yes")

"tracktraining" wrote:

Hi All,

Is there a way to count only if both conditions are met? for example, count
only if column E contains "*bat*" and column K contains "*yes*", otherwise
don't count it.

any suggestion?

thanks,
Tracktraining
--
Learning



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default countif for multiple criteria?

Tested with the asterisk a real asterisk, not a wildcard.
--
Gary''s Student - gsnu200836


"Mike H" wrote:

Sumproduct and wildcards!! tested?

"Gary''s Student" wrote:

Any time you need multiple criteria, think SUMPRODUCT()

=SUMPRODUCT((E1:E100="*bat*")*(K1:K100="*yes*"))

see:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
for the complete story.

--
Gary''s Student - gsnu200836


"tracktraining" wrote:

Hi All,

Is there a way to count only if both conditions are met? for example, count
only if column E contains "*bat*" and column K contains "*yes*", otherwise
don't count it.

any suggestion?

thanks,
Tracktraining
--
Learning

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default countif for multiple criteria?

only if column E contains "*bat*" and column K contains "*yes*",

Apologies I read the post differently

Mike

"Gary''s Student" wrote:

Tested with the asterisk a real asterisk, not a wildcard.
--
Gary''s Student - gsnu200836


"Mike H" wrote:

Sumproduct and wildcards!! tested?

"Gary''s Student" wrote:

Any time you need multiple criteria, think SUMPRODUCT()

=SUMPRODUCT((E1:E100="*bat*")*(K1:K100="*yes*"))

see:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
for the complete story.

--
Gary''s Student - gsnu200836


"tracktraining" wrote:

Hi All,

Is there a way to count only if both conditions are met? for example, count
only if column E contains "*bat*" and column K contains "*yes*", otherwise
don't count it.

any suggestion?

thanks,
Tracktraining
--
Learning

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 181
Default countif for multiple criteria?

When I need this condition I add a third column with a =Concatenate(e2,k2)
function and then =countif(range,batyes).. you can hide the third column.

"Eduardo" wrote:

Hi
try

=COUNTIF(e2:e15,"Bat")-COUNTIF(k2:k15,"yes")

"tracktraining" wrote:

Hi All,

Is there a way to count only if both conditions are met? for example, count
only if column E contains "*bat*" and column K contains "*yes*", otherwise
don't count it.

any suggestion?

thanks,
Tracktraining
--
Learning

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default countif for multiple criteria?

Thanks all for helping out. I tried every suggestion and the one that works
for me is Mikes:
=COUNT(IF(ISNUMBER(SEARCH("*xoft*",E1:E14)),IF(ISN UMBER(SEARCH("*yes*",K1:K14)),1)))


Thanks again.

--
Learning


"Mike H" wrote:

Try

=COUNT(IF(ISNUMBER(SEARCH("BAT",E1:E13)),IF(ISNUMB ER(SEARCH("YES",K1:K13)),1)))

'This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correctly then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array

Mike



"tracktraining" wrote:

Hi All,

Is there a way to count only if both conditions are met? for example, count
only if column E contains "*bat*" and column K contains "*yes*", otherwise
don't count it.

any suggestion?

thanks,
Tracktraining
--
Learning

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 with multiple criteria Sarah (OGI) Excel Discussion (Misc queries) 3 January 13th 09 10:49 AM
Countif with multiple criteria Romi Excel Discussion (Misc queries) 0 December 5th 08 02:30 PM
Nesting COUNTIF for multiple criteria in multiple columns NeedExcelHelp07 Excel Worksheet Functions 1 December 12th 07 05:47 PM
Multiple CountIf Criteria JerryS Excel Worksheet Functions 1 October 14th 05 07:14 PM
Countif with multiple criteria and multiple worksheets JJ Excel Worksheet Functions 1 December 28th 04 06:37 PM


All times are GMT +1. The time now is 10:14 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"