Solved

Using ISERROR with OR

Posted on 2013-01-31
2
258 Views
Last Modified: 2013-01-31
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
Comment
Question by:Alex972
2 Comments
 
LVL 23

Accepted Solution

by:
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

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

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

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question