Solved

Using ISERROR with OR

Posted on 2013-01-31
2
260 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

829 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