+ Reply to Thread
Results 1 to 8 of 8

Do Find & Replace multiple times using data in Col B for find & data in Col C for replace

  1. #1
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Florida
    MS-Off Ver
    Home -Excel 2007, Work 2016
    Posts
    254

    Do Find & Replace multiple times using data in Col B for find & data in Col C for replace

    In column A I have over 250 pieces of data - odd data in that it is separated into 4 parts because there a 3 periods in each piece of data.
    In columns B & C I have about 90 rows of Find this Data (Column B) and equal number of rows of "change to" data in column C
    I want all 4 parts to contain 3 digits
    For example in B I have find .0. and in C1 I have .000. as the data to replace .0.
    Want the macro to run and run until ever possibility in Column B has been checkid out.
    Is this do one thing after another - row after row called a loop?
    Thanks
    Last edited by ILoveStMartin; 10-27-2012 at 08:56 AM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Do Find & Replace multiple times using data in Col B for find & data in Col C for repl

    Try this

    Please Login or Register  to view this content.
    Open up the VBA editor by hitting ALT F11

    Insert a new module by hitting Insert - Module

    Paste the macro into the empty sheet

    Hit ALT F11 to get back to the worksheet.

    Run the macro by going to tools-macro in Excel 2003 or the view ribbon in Excel 2007/2010.

  3. #3
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Florida
    MS-Off Ver
    Home -Excel 2007, Work 2016
    Posts
    254

    Re: Do Find & Replace multiple times using data in Col B for find & data in Col C for repl

    Thought I had replied but don't see it - Excuse if sent 2 times -
    Did not work, but could be because of the placement of my data.
    What columns is this sent to work with?
    I have the date that is to be manipulated in A, the "Find This" in B and the "Replace With" in C.
    Top row of all is 8.
    Thanks
    Bill

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Do Find & Replace multiple times using data in Col B for find & data in Col C for repl

    You would need to set N = 8 in the first row of code. If you still have problems, I suggest posting a copy of the actual data as there may be some important detail that your description missed.

  5. #5
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Florida
    MS-Off Ver
    Home -Excel 2007, Work 2016
    Posts
    254

    Re: Do Find & Replace multiple times using data in Col B for find & data in Col C for repl

    Woops - put up the wrong file
    Attached Files Attached Files
    Last edited by ILoveStMartin; 10-28-2012 at 11:28 PM.

  6. #6
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: Do Find & Replace multiple times using data in Col B for find & data in Col C for repl

    Hi -

    Give a try using FIND method;

    Please Login or Register  to view this content.
    Regards,
    event

  7. #7
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Florida
    MS-Off Ver
    Home -Excel 2007, Work 2016
    Posts
    254

    Re: Do Find & Replace multiple times using data in Col B for find & data in Col C for repl

    It worked - Thanks
    BUT - I try to learn from you guys so I would like a tad bit more help here - PLEASE!
    If I wanted to use this other times - with other configurations - what is it that is now Column A, what is it that is now column B and what is it that is now column C?
    I tried to play with your solution by putting the data that is now in B & C into C & D and then changed your macro - changing each b to c and each c to d, but it did not run.
    Thanks

  8. #8
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: Do Find & Replace multiple times using data in Col B for find & data in Col C for repl

    Hi -

    Your problem has been solve now based on your feedback, and if you have read the rules, you know what's next;

    Anyway, to give you some idea, I have commented the codes;
    Please Login or Register  to view this content.
    Regards,
    event

+ 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