Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
CountIf query within text string
Hi all,
I am trying to count a word within a range of cells. Some cells may contain the word within a text string for example: Count the word "red" within "red 1", "red 2", "red 3" etc. I know this can be done with the formula..."=CountIf(range, "*red*")" The real question is if this is possible to search by a cell value? ie. If cell "A1" equals "red" then count "red", if "A1" equals "blue" then count the number of times "blue" appears. Hope this makes sense. Thank you. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
CountIf query within text string
John
The folmula you need is:- =COUNTIF(range,"=" & A1) Regards. -- Alan Moseley IT Consultancy http://www.amitc.co.uk "JohnH" wrote: Hi all, I am trying to count a word within a range of cells. Some cells may contain the word within a text string for example: Count the word "red" within "red 1", "red 2", "red 3" etc. I know this can be done with the formula..."=CountIf(range, "*red*")" The real question is if this is possible to search by a cell value? ie. If cell "A1" equals "red" then count "red", if "A1" equals "blue" then count the number of times "blue" appears. Hope this makes sense. Thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using a sub string in a COUNTIF | Excel Discussion (Misc queries) | |||
CountIf query for words within string | Excel Programming | |||
COUNTIF according to presence of string within text | Excel Worksheet Functions | |||
Countif function for instances of text string contained | Excel Worksheet Functions | |||
Countif function for instances of text string contained | Excel Worksheet Functions |