ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   calculating strings (excel 2002) (https://www.excelbanter.com/excel-worksheet-functions/12192-calculating-strings-excel-2002-a.html)

student_hki

calculating strings (excel 2002)
 
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".

Dave R.

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

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




"student_hki" wrote in message
om...
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".





All times are GMT +1. The time now is 01:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com