Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I currently use a COUNTIF to count how many times a name occurs in a range of
cells. That works fine if the cell contains only that string. But how can I do the COUNTIF if the cell has other text in it as well? For instance, I'm counting for "Nancy" in the cells, but if the cell contains "Bob and Nancy", I want to count it as well. I assume I need to use the "SEARCH" or "FIND" function, but can't figure out what argument to feed it: =COUNTIF(A1:D15, FIND("Nancy, ?)) Other ideas? Thanks, Pete |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=COUNTIF(A1:D15,"*Nancy*")
If this post helps click Yes --------------- Jacob Skaria "PeteJ" wrote: I currently use a COUNTIF to count how many times a name occurs in a range of cells. That works fine if the cell contains only that string. But how can I do the COUNTIF if the cell has other text in it as well? For instance, I'm counting for "Nancy" in the cells, but if the cell contains "Bob and Nancy", I want to count it as well. I assume I need to use the "SEARCH" or "FIND" function, but can't figure out what argument to feed it: =COUNTIF(A1:D15, FIND("Nancy, ?)) Other ideas? Thanks, Pete |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() This was helpful tip. Using wildcards!! Thanks Jacob! Cheers Nitin On Saturday, 18 July 2009 03:58:01 UTC+10, Jacob Skaria wrote: =COUNTIF(A1:D15,"*Nancy*") If this post helps click Yes --------------- Jacob Skaria "PeteJ" wrote: I currently use a COUNTIF to count how many times a name occurs in a range of cells. That works fine if the cell contains only that string. But how can I do the COUNTIF if the cell has other text in it as well? For instance, I'm counting for "Nancy" in the cells, but if the cell contains "Bob and Nancy", I want to count it as well. I assume I need to use the "SEARCH" or "FIND" function, but can't figure out what argument to feed it: =COUNTIF(A1:D15, FIND("Nancy, ?)) Other ideas? Thanks, Pete |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change 3 letter text string to a number string | Excel Discussion (Misc queries) | |||
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 | |||
COUNTIF - everything excluding a string | Excel Worksheet Functions |