Tech Support banner

Status
Not open for further replies.
1 - 3 of 3 Posts

·
Registered
Joined
·
2 Posts
Discussion Starter · #1 ·
I am trying to do the following:

If cell A1 contains the characters "ABC" anywhere in the string or value, then "Y", else "N". I almost have it by using =if((search("ABC",A1)),"Y","N"). However, with the "else" if "ABC" is not found, it returns #VALUE! as opposed to "N".

Any assistance you can provide, would be greatly appreciate! Thanks. -m
 

·
Security Manager, Analyst , Rangemaster, TSF Acade
Joined
·
39,538 Posts
Hi and welcome to TSF.

Try

=IF(ISNUMBER(SEARCH("abc",A1,1)),"Y","N")

ISNUMBER checks the type of value and returns TRUE or FALSE. The #VALUE error refers to the fact that Excel could not translate the value to the type required.
 
1 - 3 of 3 Posts
Status
Not open for further replies.
Top