Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default COUNTIF with text criteria

Help please.
I have troubles with COUNTIF. I need to count rows with two criteria in
different columns both are parts of text. For example: text1- €œcounting text
cells€- criteria- €œ*text*€; text2- €œC00000005€-criteria €œ*5*€. My COUNTIF
doesnt work.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default COUNTIF with text criteria

Use SUMPRODUCT():

Say we have data like:

small cat
medium dog
large mouse
small bird
medium ant
large cat
small dog
medium mouse
large bird
small ant
medium cat
large dog
small mouse
medium bird
large ant
small cat
medium dog
large mouse
small bird
medium ant
large cat

To count the number of rows containing:

small cat

we can use:

=SUMPRODUCT(--(A1:A21="small")*(B1:B21="cat"))

Note that this can be expanded to include as many columns as you want.
--
Gary''s Student - gsnu200787


"Alexey" wrote:

Help please.
I have troubles with COUNTIF. I need to count rows with two criteria in
different columns both are parts of text. For example: text1- €œcounting text
cells€- criteria- €œ*text*€; text2- €œC00000005€-criteria €œ*5*€. My COUNTIF
doesnt work.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default COUNTIF with text criteria

Thank you,
But what can we do if we have: very small, extremally small and small cats?
and how to cout all small cats?

"Gary''s Student" wrote:

Use SUMPRODUCT():

Say we have data like:

small cat
medium dog
large mouse
small bird
medium ant
large cat
small dog
medium mouse
large bird
small ant
medium cat
large dog
small mouse
medium bird
large ant
small cat
medium dog
large mouse
small bird
medium ant
large cat

To count the number of rows containing:

small cat

we can use:

=SUMPRODUCT(--(A1:A21="small")*(B1:B21="cat"))

Note that this can be expanded to include as many columns as you want.
--
Gary''s Student - gsnu200787


"Alexey" wrote:

Help please.
I have troubles with COUNTIF. I need to count rows with two criteria in
different columns both are parts of text. For example: text1- €œcounting text
cells€- criteria- €œ*text*€; text2- €œC00000005€-criteria €œ*5*€. My COUNTIF
doesnt work.

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: 2 criteria: Date Range Column & Text Column MAC Excel Worksheet Functions 14 September 16th 08 04:39 PM
Using Countif two criteria Mifty Excel Discussion (Misc queries) 5 November 19th 07 11:35 AM
COUNTIF criteria roohbir Excel Discussion (Misc queries) 9 September 24th 06 08:11 PM
Countif using format criteria not number criteria? Rumbla76 Excel Worksheet Functions 1 April 20th 05 05:38 AM
Countif using format criteria....not number criteria? Troy Excel Worksheet Functions 1 April 20th 05 04:50 AM


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