Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default CountIf query for words within string

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default CountIf query for words within string

If I follow simply amend your formula

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

Regards,
Peter T

"JohnH" wrote in message
...
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
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 numbers and words Joe Excel Worksheet Functions 4 October 7th 09 11:14 AM
Countif - Key words PAL Excel Worksheet Functions 4 June 19th 09 04:52 AM
return first TWO or THREE words in string EngelseBoer Excel Discussion (Misc queries) 10 September 7th 08 04:51 PM
Format particular words in a string Glen[_6_] Excel Programming 1 March 11th 08 01:27 PM
Break string into words Tommy T Excel Programming 2 January 29th 04 03:48 AM


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