+ Reply to Thread
Results 1 to 6 of 6

Pulling a string of text

  1. #1
    Registered User
    Join Date
    07-05-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    57

    Pulling a string of text

    So I am using an if function to try and pull certain phrases from and column. Ideally I want to pull certain keywords from a big phrase and have it classify them in a different column.

    Right now I am using the following (just a piece of a longer formula):

    if (H:H="MC","Multi Carrier",if(H:H="MetChoice","Choice".....)

    And an example of an entry in column H would be MC - Liberty, Travelers

    Or something similar to that. But when it runs the formula it returns nothing because it is looking for an exact match of "MC" or "Metchoice". How do I get the formula to see if the phrase includes either of those, and return the correct keyword.

    This would be a huge help, thank you!

    Rob

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Pulling a string of text

    without seeing your data I would suggest looking at the AND and OR Function that you can use in your IF statement....if you need help with those functions please let me know....
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,118

    Re: Pulling a string of text

    will they always be at the start

    left(h2,2)="MC"
    left(H2,9)="metchoice"

  4. #4
    Registered User
    Join Date
    07-05-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Pulling a string of text

    Here is a bit of the data, this is what I am trying to do.

    In column B I want it to return "Multi Carrier" if the cell in Column A starts with "MC", return "Choice" if the cell in A starts with "MetChoice", and return nothing if the cell in A is single carrier.

    Any ideas???

    Hope the example helps
    Attached Files Attached Files

  5. #5
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Pulling a string of text

    Etaf pretty much nailed it -- this would be the whole thing

    Please Login or Register  to view this content.
    put this in B2 and copy it down....

  6. #6
    Registered User
    Join Date
    07-05-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Pulling a string of text

    Thanks for all the help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1