Home » excel » Excel – IFERROR Function

# Excel – IFERROR Function

Posted by: admin May 14, 2020 Leave a comment

Questions:

Having some issues with my formula and I’m hoping to find some help here.

This is my formula:

``````=IFERROR(REPLACE(F7, FIND("BOB",A2), 13, "Other"),A2)
``````

I have 3 names in my data (Column B):

• Bob
• Sarah
• Lee

What I want to do is find “Bob”‘s name and in column C return it as “Other”, and I want Sarah to return as Sarah and Lee to return as Lee.

With my formula, currently it’s returning everyone’s name as “Open” and I’m not quite sure why.

Any recommendations?

How to&Answers:

Use:

``````=IF(ISNUMBER(FIND("Bob",A2)),"Other",A2)
`````` one thing to remember `FIND` is an exact match while `SEARCH` does not care about case.

So if `Bob` can be `BOB` and `Bob` then you may want to use `SEARCH`

``````=IF(ISNUMBER(SEARCH("Bob",A2)),"Other",A2)
``````

### Answer：

An alternative to @ScottCraner’s answer.

It is unclear if you want only “Bob” to result in “Other”, or if you want anything other than “Sarah” or “Lee” to result in “Other”.

If you want the latter, you can use this array formula:

``````= IF(MAX(IFERROR(FIND({"Sarah","Lee"},A2),0))=0,"Other",A2)
``````

Note this is an array formula so you must press Ctrl+Shift+Enter on your keyboard after typing the formula rather than just Enter.