calculating strings (excel 2002)

S

student_hki

I'd like to calculate how many cells contain a certain substring in
excel 2002.
The if -worksheet function seems to recognize only the whole contents
of the cell, not a part of it. Does anybody know how to do this in
excel?


=if(A1="abc";"found";"not found")

,don't find the string, if the contents of A1 is for example
"ccabcdd".
 
D

Dave R.

=IF(COUNTIF(A1,"*abc*"),"found","not found")

that's if you want to do it for each cell.
 

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