+ Reply to Thread
Results 1 to 3 of 3

Compare Partial Content of a cell then return a different value

  1. #1
    Registered User
    Join Date
    02-10-2009
    Location
    San Diego, CA
    MS-Off Ver
    Excel 365
    Posts
    30

    Compare Partial Content of a cell then return a different value

    I am trying to simplify the values of two cells. What I want to do is return a new value based on only a partial value of a cell. Probably easier to show you.

    In the example, I'd like to associate just the first part of the text string in the cell to return a specific value. I'm assuming I would need to setup a separate table of the text strings and what they associate to. But after that I get stumped.

    thanks for any help!

    Bryce
    Attached Files Attached Files
    Last edited by brafter70; 02-27-2011 at 11:53 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Compare Partial Content of a cell then return a different value

    After you setup your table (which contains the codes in one column and the corresponding letter to apply in the next column), you probably need to insert a column between A and B if you want it to look like the sample solution table...

    Then apply a Vlookup with an extraction of the left characters before the dash..

    e.g.

    =VLOOKUP(LEFT(A3,FIND("-",A3)-1),$J$1:$K$10,2,0)

    where J1:K10 would be the reference to the table you setup up.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    02-10-2009
    Location
    San Diego, CA
    MS-Off Ver
    Excel 365
    Posts
    30

    Re: Compare Partial Content of a cell then return a different value

    Wow! Spot on! I re-read my post and I sounded like a blathering moron! How you were able to decipher that was amazing! Thanks for your help!

    Bryce

+ 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