ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula to identify a keyword in all cells of a column (https://www.excelbanter.com/excel-discussion-misc-queries/37533-formula-identify-keyword-all-cells-column.html)

HTC

Formula to identify a keyword in all cells of a column
 
I have a spreadsheet with about 5,000 rows andjust one column - column A. I
would like to record a formula in column b where for every cell in column A
that contains the word "web" somewhere in the description (the description
could have up to 10 words), it will place the number "1" in column B. Can
this be done?

I assume that it is some sort of if/then statement, but when I try
=IF(A2="*web*",1,0) with the wild card "*" it does not seem to work. Any
ideas?

Thank you,
Paul

N Harkawat

=isnumber(find("web",a1))*1

"HTC" wrote in message
...
I have a spreadsheet with about 5,000 rows andjust one column - column A.
I
would like to record a formula in column b where for every cell in column
A
that contains the word "web" somewhere in the description (the description
could have up to 10 words), it will place the number "1" in column B. Can
this be done?

I assume that it is some sort of if/then statement, but when I try
=IF(A2="*web*",1,0) with the wild card "*" it does not seem to work. Any
ideas?

Thank you,
Paul




Roger Govier

Hi Paul
One way
=IF(ISNUMBER(SEARCH("web",A2)),1,0)

--
Regards
Roger Govier
"HTC" wrote in message
...
I have a spreadsheet with about 5,000 rows andjust one column - column A.
I
would like to record a formula in column b where for every cell in column
A
that contains the word "web" somewhere in the description (the description
could have up to 10 words), it will place the number "1" in column B. Can
this be done?

I assume that it is some sort of if/then statement, but when I try
=IF(A2="*web*",1,0) with the wild card "*" it does not seem to work. Any
ideas?

Thank you,
Paul




HTC

Thank you very much for both replies.

"HTC" wrote:

I have a spreadsheet with about 5,000 rows andjust one column - column A. I
would like to record a formula in column b where for every cell in column A
that contains the word "web" somewhere in the description (the description
could have up to 10 words), it will place the number "1" in column B. Can
this be done?

I assume that it is some sort of if/then statement, but when I try
=IF(A2="*web*",1,0) with the wild card "*" it does not seem to work. Any
ideas?

Thank you,
Paul



All times are GMT +1. The time now is 10:46 PM.

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