Searching a text string in a range of cells.

G

Guest

How do i search for something within a text string in a cell which is in a
range of cells.

so if a cell contains the names "jim, bob, tom" what formula can i use to
just search for "bob"
I am currently using a SUMIF function which is only picking up cells that
only contain "bob" on its own.
 
G

Guest

=SUMIF(A1:A8,"*bob*",C1:C8)

will sum values in C1:C8 where A1:A8 contain "bob"

=COUNTIF(A1:A8,"*bob*")

will count occurences of "bob" in A1:A8 BUT only one occurence per cell i.e.
"bob,tom,jim,bob" in a cell will count as 1

HTH
 
G

Guest

Thank you very much! That worked perfectly!

Toppers said:
=SUMIF(A1:A8,"*bob*",C1:C8)

will sum values in C1:C8 where A1:A8 contain "bob"

=COUNTIF(A1:A8,"*bob*")

will count occurences of "bob" in A1:A8 BUT only one occurence per cell i.e.
"bob,tom,jim,bob" in a cell will count as 1

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top