• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to find piece of specific text and return specific text.

ngabriel

New Member
Hello everyone, I am working on project and having hard time to find piece of text and return specific text. My formula works only with two variable, and I need to add one more. If column A contains piece of text "*MLTC*" return "MLTC", if contains "*NYIAP*" return "NYIA", if does not contain NYIA or MLTC return "MMC". Here is my formula:
=IFERROR(IF(SEARCH("*MLTC*",A2,1),"MLTC"),IF(SEARCH("*NYIAP MMC*",A2,1),"NYIAP"))

How should I add if cell does not contain NYIAP and MLTC return MMC. Thank you
AB
NYIAP MMC InitialNYIAP
MMC Initial NYIAPNYIAP
MMC InitialMMC
MLTC InitialMLTC
Peds InitialMM
 
a sample sheet would help here

I need to add one more. If column A contains piece of text "*MLTC*" return "MLTC", if contains "*NYIAP*" return "NYIA", if does not contain NYIA or MLTC return "MMC". Here is my formula:

=IF( ISNUMBER(Search("MLTC",A2,1)), "MLTC", IF( ISNUMBER(Search("NYIAP",A2,1)), "NYIAP", "MMC"))
 

Attachments

  • example-ETAF.xlsx
    9.3 KB · Views: 3
That's exactly what I just suggested on ExcelGuru:

 

ngabriel

As You've read from (both sites) Forum Rules before start to posting:
  • Cross-Posting. Generally, it is considered poor practice to cross post. That is to post the same question on several forums in the hope of getting a response quicker.
  • If you do cross-post, please put that in your post.
  • Also if you have cross-posted and get an Solution elsewhere, have the courtesy of posting the Solution here so other readers can learn from the answer also, as well as stopping people wasting their time on your answered question.
Please, reread
These rules are for everyone.
 
Back
Top