ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Search for string of characters in a cell (https://www.excelbanter.com/excel-discussion-misc-queries/199725-search-string-characters-cell.html)

BRB

Search for string of characters in a cell
 
Hello,
I need to search for a string of characters in a cell and plave a "1" in
another cell if the string exists, such as:
If the string "HW0" appears I need to put a 1 in adjacent cell

A B
HW0233 1
hw0
apple

dog
HW03 1

I tried =find("HW0",A1,1), but if the cell is empty it returns #VALUE.

Help is appreciated.

T. Valko

Search for string of characters in a cell
 
Try this:

=IF(COUNT(FIND("HW0",A1)),1,"")

--
Biff
Microsoft Excel MVP


"BRB" wrote in message
...
Hello,
I need to search for a string of characters in a cell and plave a "1" in
another cell if the string exists, such as:
If the string "HW0" appears I need to put a 1 in adjacent cell

A B
HW0233 1
hw0
apple

dog
HW03 1

I tried =find("HW0",A1,1), but if the cell is empty it returns #VALUE.

Help is appreciated.




BRB

Search for string of characters in a cell
 
Thank you... It worked well.

"T. Valko" wrote:

Try this:

=IF(COUNT(FIND("HW0",A1)),1,"")

--
Biff
Microsoft Excel MVP


"BRB" wrote in message
...
Hello,
I need to search for a string of characters in a cell and plave a "1" in
another cell if the string exists, such as:
If the string "HW0" appears I need to put a 1 in adjacent cell

A B
HW0233 1
hw0
apple

dog
HW03 1

I tried =find("HW0",A1,1), but if the cell is empty it returns #VALUE.

Help is appreciated.





T. Valko

Search for string of characters in a cell
 
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"BRB" wrote in message
...
Thank you... It worked well.

"T. Valko" wrote:

Try this:

=IF(COUNT(FIND("HW0",A1)),1,"")

--
Biff
Microsoft Excel MVP


"BRB" wrote in message
...
Hello,
I need to search for a string of characters in a cell and plave a "1"
in
another cell if the string exists, such as:
If the string "HW0" appears I need to put a 1 in adjacent cell

A B
HW0233 1
hw0
apple

dog
HW03 1

I tried =find("HW0",A1,1), but if the cell is empty it returns #VALUE.

Help is appreciated.








All times are GMT +1. The time now is 02:32 AM.

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