Solved

Using ISERROR with OR

Posted on 2013-01-31
261 Views
I have a cell that can have the value "MGR" or "MANAGER" in it along with other information.
MGR and MANAGER may be at the beginning of the field or in the middle or at the end.
You might have "MGR OF LOGISTICS" or "MANAGER OF LOGISTICS" or "KITCHEN MANAGER".
If you have MGR or MANAGER, I want it to come back with "MGR".
If it is NOT MGR or MANAGER, I don't want an error, but a blank.
0
Question by:Alex972
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 23

Accepted Solution

NBVC earned 500 total points
ID: 38841493
Try:

=IF(OR(ISNUMBER(SEARCH({"Mgr","Manager"},A1))),"MGR","")

where A1 contains original text.
0

LVL 24

Expert Comment

ID: 38841551
Another solution (of which there is undoubtably many)

=IF(OR(COUNTIF(A1,"*MGR*"),COUNTIF(A1,"*MANAGER*")),"MGR","")
0

Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…