Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Countif with numbers and words | Excel Worksheet Functions | |||
Countif - Key words | Excel Worksheet Functions | |||
return first TWO or THREE words in string | Excel Discussion (Misc queries) | |||
Format particular words in a string | Excel Programming | |||
Break string into words | Excel Programming |