+ Reply to Thread
Results 1 to 5 of 5

replace code/id values with a name found in a list

  1. #1
    Registered User
    Join Date
    03-17-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    74

    replace code/id values with a name found in a list

    Hi, Couldn't think how I could describe this problem in my topic title.

    Please see the attachment

    I need a macro that will replace the codes in worksheet 1 column C.

    To do this I will need to look up the id in Worksheet 2 column B and then replace it using the associated name in Column A of worksheet 2.

    All help much appreciated!
    Attached Files Attached Files

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: replace code/id values with a name found in a list

    I believe this does what you are looking for:

    Please Login or Register  to view this content.
    Let me know if I got that wrong.

    You could also use a vlookup in column D and then paste the values over to column C, if you don't want to use vba.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  3. #3
    Registered User
    Join Date
    03-17-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: replace code/id values with a name found in a list

    thats perfect, i tested it with this small sample

    i will have to test it tomorrow at work too see if it works well with a much larger sample!

    many thanks for your help!

  4. #4
    Registered User
    Join Date
    07-10-2015
    Location
    NY, USA
    MS-Off Ver
    2007
    Posts
    4

    Re: replace code/id values with a name found in a list

    Hi,

    I have something similar to ebbo but in my case the worksheet 1 column B have comma separated values which need to be looked up in worksheet 2 column B and replace it using the associated id in column A of worksheet 2.

    Please see attached.

    Any help much appreciated!

    Thank you.
    Attached Files Attached Files

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: replace code/id values with a name found in a list

    Hi, itmanager,

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ 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