+ Reply to Thread
Results 1 to 6 of 6

Expand a code using a formula in Excel

  1. #1
    Registered User
    Join Date
    11-19-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    32

    Expand a code using a formula in Excel

    Hi All,

    I require a formula to assist with returning results from a code.

    Basically I will have numerous codes being developed based on particular outcomes and I want to be able to utilise a formula to tell me what that code actually means.

    e.g.
    S = Successful
    0 = 1
    1 = 2
    2 = 3
    3 = 4
    UNK = UNK

    S0133UNK = Succesful1244UNK
    S0123UNK = Succesful1344UNK
    S0212UNK = Succesful1323UNK

    if I get an outcome equal to 'S0133UNK', I want 'Succesful1244UNK' to return.

    Is there something I can use? The variables I may have is extensive and i'd like to be able to put in the details and have an outcome return.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Expand a code using a formula in Excel

    Is the format always like that...letter, 4 single-digit-numbers,3 letters?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Expand a code using a formula in Excel

    Hi,

    This is Firm & Fix for the data provided in your example.

    The same can be finalized only after answering Question "POST 2" FDibbins.

    Punnam
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Expand a code using a formula in Excel

    Slight variation of Punnam's formula...
    =IFERROR(VLOOKUP(LEFT(A8,1),$A$1:$B$6,2,0)&MID(A8,2,4)+1111&VLOOKUP(RIGHT(A8,3),$A$1:$B$6,2,0),"")
    BUT, this is based on the assumption that your sample data is "carved in stone"

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Expand a code using a formula in Excel

    deleted duplicate post

  6. #6
    Registered User
    Join Date
    11-19-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    32

    Re: Expand a code using a formula in Excel

    Hi Punnam. This almost got me there. Is there anyway to apply this to multiply lists and combine into one result? It looks like I have some codes coming through with values that are the same but equal something different so i'll need different tables to house the data?

    e.g.
    one table
    1 = S
    2 = NS
    3 = SP

    another table
    0 = NP
    1 = PPE
    2 = NPPE etc.

    any ideas?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Expand Code to include more data
    By Bbjpilot224 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-21-2014, 11:03 PM
  2. Expand and Collapse Grouping Code
    By Dulanic in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-15-2010, 01:03 PM
  3. Expand formula in EXCEL
    By ÎÎ¹ÎºÎ¿Ï in forum Excel General
    Replies: 2
    Last Post: 07-31-2006, 06:53 AM
  4. Code:How do I create columns that expand and collapse in Excel?
    By Ron Coderre in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 07:05 AM
  5. [SOLVED] Is it possible to expand the formula bar in excel?
    By Tivpine in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2005, 07:05 PM

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