+ Reply to Thread
Results 1 to 4 of 4

Code Read

  1. #1
    Registered User
    Join Date
    01-27-2012
    Location
    Earth
    MS-Off Ver
    Excel 2010
    Posts
    2

    Angry Code Read

    It's been a while since I've had to do anything like this but I am trying to work out a formula or something to read a string of code.

    It's alpha numeric and each code means something different. The codes show up in a single cell e.g. A1 B2 C3.

    I need a formula that can look at the string of text and establish that A1 is Apple, B2 is Bananas and C3 is Carrots, as an example.

    I am completely stuck, any ideas?

    I've attached a basic example of what I want to do

    Example.xlsx
    Last edited by mc11; 01-27-2012 at 10:29 PM. Reason: Attatch Example

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Code Read

    mc11,

    Welcome to the forum!
    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    01-27-2012
    Location
    Earth
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Code Read

    Okay, thanks, I'll do that now!

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Code Read

    mc11,

    Attached is a modified version of your workbook. I reformatted your Key into an Excel-friendly table so that vlookups could be performed on it. Then, in cell A2 is this formula copied over and down:
    =IFERROR(VLOOKUP(TRIM(MID(SUBSTITUTE($D2," ",REPT(" ",99)),MAX((MATCH(A$1,$A$1:$C$1,0)-1)*99,1),99)),$G$2:$H$10,2,FALSE),"")
    Attached Files Attached Files

+ 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