Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I have a string to find in a cell such as:

[Agent Name & ID: Christopher Montaray - 1011]

… and I use the IF statement, can I search for a part of it? For example:

=IF (A1="Chris",1,0)
share|improve this question

2 Answers 2

up vote 0 down vote accepted

You need to use SEARCH or FIND, which will return the position of the start of the string you want to locate, or an error if the string is not present. e.g.

=SEARCH("Chris", A1)

You can then use IFERROR or another function like that to handle the error case.

share|improve this answer

You could also use COUNTIF function with a wildcard which will give you 1 or 0 directly


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.