+ Reply to Thread
Results 1 to 4 of 4

Formula Question

  1. #1
    Registered User
    Join Date
    08-03-2007
    Posts
    12

    Formula Question

    I am trying to write a formula to say:

    If this cell contains this phrase then have the cell equal ""

    I have these values
    js = Jan
    jdg = John
    bhm = Brian
    rst = Ryan
    kle = Kate

    So the cell will contain either one of these abbreviations (js, jdg..etc) and if that cell contains one of them then i want the formula to equal Jan, John..etc.

    in english the formula is something like =if((A1=*js*,"Jan"),A1=*jdg*,"John")...etc

    The other thing is that the cell that contains the abbreviation also contains other text such as "New Retailer - [JS]" or "New Vendor - [jdg]". so i want to just search for "js" or "jdg" in the cell and if that cell has that value then have it equal Jan or John...etc

    Any suggestions....Thank you
    Last edited by grant862; 04-09-2008 at 05:49 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,804
    Here's one way

    =LOOKUP(2^15,SEARCH({"js";"jdg";"bhm";"rst";"kle"},A1),{"Jan";"John";"Brian";"Ryan";"Kate"})

  3. #3
    Registered User
    Join Date
    08-03-2007
    Posts
    12
    Quote Originally Posted by daddylonglegs
    Here's one way

    =LOOKUP(2^15,SEARCH({"js";"jdg";"bhm";"rst";"kle"},A1),{"Jan";"John";"Brian";"Ryan";"Kate"})
    That works perfect...thanks

    1 more thing...can you explain this formula a bit, What exactly it is doing...as in what is the 2^15 for. What does that do exactly. Otherwise the formula kind of make sense to me.

    thanks

  4. #4
    Registered User
    Join Date
    08-03-2007
    Posts
    12
    Quote Originally Posted by grant862
    That works perfect...thanks

    1 more thing...can you explain this formula a bit, What exactly it is doing...as in what is the 2^15 for. What does that do exactly. Otherwise the formula kind of make sense to me.

    thanks

    Nevermind i think i figured it out. Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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