+ Reply to Thread
Results 1 to 7 of 7

Require code that will compare new list to old list

  1. #1
    Registered User
    Join Date
    03-21-2013
    Location
    England
    MS-Off Ver
    2007
    Posts
    21

    Require code that will compare new list to old list

    I have a spreadsheet that requires massive updates and changes. I could do this using the replace function but that would still take a long time due to the number of changes that will be required.

    What I need is a one click macro that will look at one column (A) and replace all occurances in the entire workbook (not just one sheet) exluding the reference sheet with the replace code that will be in column (B).

    Old Code (A) New Code (B)
    a - aa
    b - bb
    c - cc
    d - dd
    e - ee
    f - ff
    g - gg
    h - hh
    i - ii
    j - jj
    k - kk
    l - ll

    Hope this makes sense and someone can help. TY
    Last edited by knighty2002uk; 03-28-2013 at 05:50 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Require code that will compare new list to old list

    Will the data be in one column in the sheets where it needs to be replaced or will it be anywhere in the sheet?

    Also if it will be in one column, will it be in the same column in all sheets?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    03-21-2013
    Location
    England
    MS-Off Ver
    2007
    Posts
    21

    Re: Require code that will compare new list to old list

    No, the data that needs changing can be anywhere within the sheets.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Require code that will compare new list to old list

    Try this code
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button

  5. #5
    Registered User
    Join Date
    03-21-2013
    Location
    England
    MS-Off Ver
    2007
    Posts
    21

    Re: Require code that will compare new list to old list

    I think thats going to be it. You are a scholar and a gentleman. TY so much.

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Require code that will compare new list to old list

    Gentle lady

    Am glad it worked.

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.

  7. #7
    Registered User
    Join Date
    03-21-2013
    Location
    England
    MS-Off Ver
    2007
    Posts
    21

    Re: Require code that will compare new list to old list

    Not a lady, or wasn't last time I checked down there and I have already given you the feedback by using the star, but thanks for the reminder anyway.

+ 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