Page 1 of 1

[Solved] Search and Replace Text

Posted: Mon Apr 08, 2019 4:16 pm
by Moon Lit Nights
Hi,

I am trying to search content in several cells (their info changes based on another cell) and would like to replace the original text with 1 [EDIT: or any other number other than 0] if the word is found and 0 if the word is not found. These numbers are then summed together. It's rough for me to put into words so I am attaching a sheet.

Any help would be greatly appreciated.

Re: Search and Replace Text

Posted: Mon Apr 08, 2019 4:31 pm
by FJCC
You can use a formula like

Code: Select all

=NOT(ISERROR(FIND("Hello";$B2)))
or

Code: Select all

=NOT(ISERROR(SEARCH("Hello";$B2)))
FIND() is case sensitive, SEARCH() is not.
These will return TRUE or FALSE. You can format the cells as integer numbers if you want to see 1 and 0 instead of TRUE and FALSE. TRUE has a value of 1 and FALSE has a value of 0, so the sum will work in either case.

Re: Search and Replace Text

Posted: Mon Apr 08, 2019 4:41 pm
by Moon Lit Nights
Worked perfectly, thank you so very much!