PC Review


Reply
Thread Tools Rate Thread

CountIf query for words within string

 
 
JohnH
Guest
Posts: n/a
 
      20th Oct 2008
Hi all,

I am trying to find a formula that will count specific words within a range.
Some of the cells may be part of a text string for example:

count the word "red" within cells containing "red", "red 1", "red 2" etc.
I know this can be done with the formula...=countif(range, "*red*")

The real question is if I can do this by searching for a word within a cell
value? So, if cell "A1" equals "red", count "red", if cell "A1" equals
"blue", count blue.
Thanks in advance.

 
Reply With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      20th Oct 2008
If I follow simply amend your formula

=countif(range, "*" & A1 & "*")

Regards,
Peter T

"JohnH" <(E-Mail Removed)> wrote in message
news:9532B661-6A04-4045-925E-(E-Mail Removed)...
> Hi all,
>
> I am trying to find a formula that will count specific words within a
> range.
> Some of the cells may be part of a text string for example:
>
> count the word "red" within cells containing "red", "red 1", "red 2" etc.
> I know this can be done with the formula...=countif(range, "*red*")
>
> The real question is if I can do this by searching for a word within a
> cell
> value? So, if cell "A1" equals "red", count "red", if cell "A1" equals
> "blue", count blue.
> Thanks in advance.
>



 
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 with numbers and words Joe Microsoft Excel Worksheet Functions 4 7th Oct 2009 11:14 AM
Countif - Key words PAL Microsoft Excel Worksheet Functions 3 19th Jun 2009 04:52 AM
RE: Countif - Key words Gary''s Student Microsoft Excel Worksheet Functions 0 18th Jun 2009 03:14 PM
CountIf query within text string JohnH Microsoft Excel Programming 1 20th Oct 2008 12:21 PM
Re: Using COUNTIF for Counting Words? Dave Peterson Microsoft Excel Worksheet Functions 1 26th Sep 2005 08:40 PM


Features
 

Advertising
 

Newsgroups
 


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