ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula that 'contains' a specific word (https://www.excelbanter.com/excel-worksheet-functions/70084-formula-contains-specific-word.html)

TMF in MN

Formula that 'contains' a specific word
 
In this scenario I would like column C to show 0 for any cell in column a
that contains the word "dogs."

a b c c should be
1 xx dogs 33 0
2 rr cat 16 16
3 zz dogs 5 0

Thank you.


Richard O. Neville

Formula that 'contains' a specific word
 
The formula in C2 would be: =IF(A2="dogs",0). You must use quotes for any
text in a formula. Then spread this formula down column C.

"TMF in MN" wrote in message
...
In this scenario I would like column C to show 0 for any cell in column a
that contains the word "dogs."

a b c c should be
1 xx dogs 33 0
2 rr cat 16 16
3 zz dogs 5 0

Thank you.




TMF in MN

Formula that 'contains' a specific word
 
That does work except for the variable text that is contained with the word
dogs. I would like it to return the value of 0 if the text said "xx dogs" or
"yy dogs" or just "dogs". Can you incorporate this variable into a formula?

"Richard O. Neville" wrote:

The formula in C2 would be: =IF(A2="dogs",0). You must use quotes for any
text in a formula. Then spread this formula down column C.

"TMF in MN" wrote in message
...
In this scenario I would like column C to show 0 for any cell in column a
that contains the word "dogs."

a b c c should be
1 xx dogs 33 0
2 rr cat 16 16
3 zz dogs 5 0

Thank you.





Kevin Vaughn

Formula that 'contains' a specific word
 
How about

=IF(ISERR(SEARCH("Dogs",A1)),B1,0)

--
Kevin Vaughn


"TMF in MN" wrote:

In this scenario I would like column C to show 0 for any cell in column a
that contains the word "dogs."

a b c c should be
1 xx dogs 33 0
2 rr cat 16 16
3 zz dogs 5 0

Thank you.



All times are GMT +1. The time now is 02:04 PM.

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