+ Reply to Thread
Results 1 to 3 of 3

Thread: If Contains Formula

  1. #1
    Registered User
    Join Date
    02-02-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    1

    If Contains Formula

    I'm trying to create a formula based on a cell containing an exact phrase. For Instance,

    If C3 contains "1 - Cold Prospect", then value = 1
    If C3 contains "2 - Medium Prospect", then value = 2

    I have 10 "if" possibilities. Is it possible to create a formula for this?

    Thanks for any help that can be provided!

    Mark

  2. #2
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: If Contains Formula

    Is the number always the prefix ? If so:

    =(0&LEFT(C3,2))+0
    If not, post back with more details (ie all options)

  3. #3
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2003, 2007, 2010
    Posts
    3,712

    Re: If Contains Formula

    Assuming your posted examples are simplified and the real categories won't actually have the rank as the first character...
    Try this:

    With H1:H10 containing your categories...
    V2 - Cold Prospect
    C7 - Medium Prospect
    Z99 - Indifferent Prospect
    x05 - Promising Prospect
    ...etc

    Arrange those items in rank order and use this formula:
    =IFERROR(MATCH(C3,$H$1:$H$10,0),"no match")
    Is that something you can work with?
    Regards,

    Ron
    Microsoft MVP - Excel
    (Oct 2006 - Sep 2012)

    Click here to see the Forum Rules

+ 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.2.0