excel search function

Super Contributor

Hello Everyone, 

I need help to prepare a formula where if any task is assigned to Sam or Max, then the Column 'C' should return value as 'Okay' if Sam or Max are not assigned to the respective task then it should return as 'Not Okay',

Can you please guide me, how to do it?

It should be come like this with the help of formula :

Screenshot (5258).png


Please help..??


I am using Microsoft Office 2019 Home and Student version


Here is a attached file

2 Replies
best response confirmed by Excel (Super Contributor)


In C2:

=IF(OR(ISNUMBER(SEARCH({"sam","max"},B2))),"Okay","Not Okay")

If the formula doesn't work as intended, confirm it with Ctrl+Shift+Enter.

Fill down.

Thank you very much sir