+ Reply to Thread
Results 1 to 7 of 7

Replace abbreviation with full file name

  1. #1
    Registered User
    Join Date
    06-03-2015
    Location
    Atlanta GA
    MS-Off Ver
    2010
    Posts
    4

    Replace abbreviation with full file name

    I am looking for a way to scan a column in a sheet and if the code matches with a longer version of the code in a separate column, replace the short code with the longer code. For example in column 1 rows 1-10 contain code "ABCD". Search column 2 and find "Code_Type_ABCD" and replace "ABCD" in column 1 with the value "Code_Type_ABCD" from column 2. There are 50 different codes on sheet 1 that will need to be searched for and replaced with values from sheet 2. Or even set a formula in column 3 that would list the correct code from column 2 on each row.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,831

    Re: Replace abbreviation with full file name

    Can you post a sample sheet with all codes?

  3. #3
    Registered User
    Join Date
    06-03-2015
    Location
    Atlanta GA
    MS-Off Ver
    2010
    Posts
    4

    Re: Replace abbreviation with full file name

    test.xlsx
    The first column contains the codes with the second containing the full code name. The abbreviations in the first column are the final portion of the full name.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,831

    Re: Replace abbreviation with full file name

    I am confused! Column A in sheet1 contains many repeated codes e.g ADJB and Column B in sheet1 seems to contain unrelated codes.

    example from 2 returns code in red

    ADJB== SEDC_GA_RPT_HDLA== SEDC_CA_RPT_ADJB

    The formula I used was:

    =INDEX(Sheet2!$A:$A,MATCH("*"&A1&"*",Sheet2!$A:$A,0))




  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,831

    Re: Replace abbreviation with full file name

    Test file attached - full names in Column C as you cannot replace column A with a formula.

    Hope this what you want.

  6. #6
    Registered User
    Join Date
    06-03-2015
    Location
    Atlanta GA
    MS-Off Ver
    2010
    Posts
    4

    Re: Replace abbreviation with full file name

    Column B contains the full length names of the codes in column A. Not in order however. Each code in Column A represents an individual report so there will be duplicates. I need something that will look at the value in column A, search column B for a value that has the same ending and then populate that value in Column C.
    It looks like the formula you posted does just that.

  7. #7
    Registered User
    Join Date
    06-03-2015
    Location
    Atlanta GA
    MS-Off Ver
    2010
    Posts
    4

    Re: Replace abbreviation with full file name

    Thank you very much!

+ 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. [SOLVED] Formula to change full state name to abbreviation
    By 47magic in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-25-2020, 05:55 PM
  2. [SOLVED] Macro to lookup data text and replace it with abbreviation.
    By james1432 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-20-2013, 05:56 AM
  3. [SOLVED] Macro to replace Abbreviation to full name
    By rishi.ssh in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-08-2012, 08:14 PM
  4. Display abbreviation from full name
    By snoopy1461 in forum Excel General
    Replies: 2
    Last Post: 05-26-2011, 06:21 AM
  5. Merge full text with correct abbreviation
    By Mikila11 in forum Excel General
    Replies: 14
    Last Post: 11-21-2010, 06:29 AM

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