+ Reply to Thread
Results 1 to 8 of 8

Find sting in another row on another sheet, then replace with matching cell data

  1. #1
    Registered User
    Join Date
    06-25-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    14

    Find sting in another row on another sheet, then replace with matching cell data

    Hi

    I am recieving sets of data from an extract that does not contain the full code. All the full codes are Unique. For instance 'BBA4636' will always have the full code of 'BBA4636 - S'
    What I want to do is the following:


    For eg:
    Sheet 1 Column A
    BBA4636
    BBA4689
    BBA4638
    BBA4639
    BBA4625
    BBA4641
    BBA4690
    BBA4643

    Sheet 2 Column A
    BBA4689 - A
    BBA4625 - L
    BBA4638 - F
    BBA4641 - T
    BBA4639 - Z
    BBA4690 - P
    BBA4643 - N
    BBA4636 - S
    BBA4612 - D
    BBA4601 - Q
    BBA4699 - H


    I want a macro to check the first cell in Sheet 1 Column A.
    Find that string in Sheet 2 Column A.
    Copy the cell in Sheet2 Columna A and replace the one in Sheet1 Column A
    Then proceed to the next cell in Sheet 1 Column A.

    The end result being that all the cells in Sheet 1 Column A would have the full extension.

    TestReplace.xlsx

    Thanks for your help
    Last edited by shauncat; 08-20-2012 at 02:39 AM. Reason: Spelling error in title

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Find sring in another row on another sheet, then replace with matching cell data

    We can create a new list in other sheet (area)
    =IFERROR(INDEX(Sheet2!$A$1:$A$11,MATCH(Sheet1!A1&"*",Sheet2!$A$1:$A$11,0)),A1)
    Copy down
    Quang PT

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Find sting in another row on another sheet, then replace with matching cell data

    Try the attached
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-25-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Find sring in another row on another sheet, then replace with matching cell data

    Thanks for your input.

    Unfortunatly this page will stretch out to around 25000 rows so I will need a macro.
    It is fine if it populates an adjacent blank cell though.

  5. #5
    Registered User
    Join Date
    06-25-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Find sting in another row on another sheet, then replace with matching cell data

    Thanks Jindon, I will test it tomorrow afternoon on my main sheet

  6. #6
    Registered User
    Join Date
    06-25-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Find sting in another row on another sheet, then replace with matching cell data

    Worked a treat.
    Your a star.
    Thanks for your help

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Find sting in another row on another sheet, then replace with matching cell data

    @ shauncat

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  8. #8
    Registered User
    Join Date
    06-25-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Find sting in another row on another sheet, then replace with matching cell data

    Thanks Cutter

    I will be well aware of using the solved feature in the future.

+ 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