+ Reply to Thread
Results 1 to 5 of 5

Mass find and replace of unique identifiers

  1. #1
    Registered User
    Join Date
    08-18-2015
    Location
    canberra, australia
    MS-Off Ver
    2013
    Posts
    2

    Mass find and replace of unique identifiers

    Hi

    I've inherited a massive dataset that contains many unique identifiers. The unique identifiers are too long for my purposes, and I need to shorten them across the database. Currently unique identifiers are 23 characters long (eg: @I6000000002997995944@), and I need to replace them with identifiers that are 8 characters long (eg @I10001@)

    In column A and column C of the database contain references to the 23-character unique identifiers (as well as other content) - these are the columns I need to have content replaced in. I have a list of all 23-character unique identifiers at column G, and the corresponding 8-character unique identifiers in column H.

    Basically, I want to know what is the best way to search for values in column G that are contained in column A and column C, and where found, replace them with the corresponding value in column H.

    The problem is the database is very big. Column A and C have more than 200,000 values, and the number of unique identifiers is 75,000. Doing a search and replace one by one is not possible.

    Sorry if I wasn't clear enough in explaining the issue.

    Thanks
    Last edited by sabbirhamid; 08-20-2015 at 06:47 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Mass find and replace of unique identifiers

    Hi
    Try - Ctrl+H - insert the values and click " Replace all"

  3. #3
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: Mass find and replace of unique identifiers

    Make a new column A; shifting all columns to the right. In A2, enter =VLOOKUP(B2,H:I,2,FALSE). That will locate the corresponding 8 digit identifier for what was column A. Copy down, then copy and paste as values. If an #N/A was returned, then a match wasn't found. Filter to all but #N/A's, and move those values into column B. (=A2 if applicable). Copy and paste as values. Remove your filters and delete column A.
    Now do the same method for your column C.

    If this helped, let us know.

    Pete

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Mass find and replace of unique identifiers

    Welcome to the forum.

    You say that there is other content in the cells of columns A and C that includes the 23 character codes. Seeing that you have 75000 replacement codes, search and replace would be a very tedious and time consuming task. Please upload a good sampling of your data so that a method of deconstructing the cell contents of each cell in columns A and C to isolate the 23 character string can be accomplished. Once the 23 character string has been isolated in a column of its own for both column A and C then a VLOOKUP or INDEX MATCH formula can be used to find the replacement string and then the cells can be reconstituted with the replacement values.

    Instructions for uploading:
    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  5. #5
    Registered User
    Join Date
    08-18-2015
    Location
    canberra, australia
    MS-Off Ver
    2013
    Posts
    2

    Re: Mass find and replace of unique identifiers

    Hi Pete

    Thanks for that. VLookup did the trick It took a while, but it got there. Thanks!

    newdoverman - thanks for the welcome. I'll keep that in mind for next time. Might be easier to deal with a sample workbook.

+ 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. Mass Find Replace VBA
    By robtuby in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2014, 08:23 AM
  2. Mass Find and Replace?
    By Kinanik in forum Excel General
    Replies: 5
    Last Post: 06-12-2012, 01:49 PM
  3. [SOLVED] Excel 2007 : Mass Find and Replace
    By kikokazuma in forum Excel General
    Replies: 4
    Last Post: 04-30-2012, 08:43 AM
  4. Mass find and replace
    By Watoth in forum Excel General
    Replies: 1
    Last Post: 11-01-2010, 02:09 PM
  5. Mass find and replace
    By coletteno1 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-17-2010, 07:27 AM
  6. Mass Find and Replace Macro
    By Singularity7250 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-09-2010, 08:11 AM
  7. Mass Find & Replace Script?
    By TyneeTom in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-24-2009, 03:41 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