+ Reply to Thread
Results 1 to 5 of 5

Find and Replace Loop + a Loop to remove Duplicate values

  1. #1
    Forum Contributor
    Join Date
    09-23-2015
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    187

    Find and Replace Loop + a Loop to remove Duplicate values

    Hi all,

    I am looking to do a Find Replace Loop to replace a string for another string

    In Sheets “Database” I have data from Range I19 downwards, range currently goes to I1828 but as we add more data it becomes larger. I was hoping to get a code that Finds the text “POP125 Index” and replace
    whatever row that it FINDS this in column E for “AIU8”. So it searches for the string in I and replaces whatever value is in E of that row for AIU8 The thing is the String “POP125 Index” found anywhere in column I19 onwards also has random text in it like Sept 18, or Aug 19 at the end of it, it could be total random, so the search can’t be an exact match.

    Anyone have an idea?

    Also I have unique codes in column N, I would like a loop that can scan through column N (data again is N19 downwards) and if it finds a duplicate value it deletes the Row entirely.

    Any help is much appreciated.
    Last edited by lougs7; 08-22-2018 at 04:24 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Find and Replace Loop + a Loop to remove Duplicate values

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Contributor
    Join Date
    09-23-2015
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    187

    Re: Find and Replace Loop + a Loop to remove Duplicate values

    Quote Originally Posted by mehmetcik View Post
    Please Login or Register  to view this content.
    Hey mehmetcik, I forgot to mention. The FIND takes place in column I for the value POP125 Index, but if it indeed finds that value the REPLACE needs to take place in column E for that row, so it searches for the string in I and replaces whatever value is in E of that row for AIU8. How can I incorporate an OFFSET into this FINDREPLACE?

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Find and Replace Loop + a Loop to remove Duplicate values

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    09-23-2015
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    187

    Re: Find and Replace Loop + a Loop to remove Duplicate values

    Quote Originally Posted by mehmetcik View Post
    Please Login or Register  to view this content.
    Thanks a lot! My last question, is there a how to edit this code so that if it does not find anything it doesn't fail at ".SpecialCells(xlCellTypeConstants, 1).Select" right now if it doens't find anything I get the debugger a this line.

+ 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. Find and Replace Loop does not find all and loop properly
    By mattyfaz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2015, 02:15 AM
  2. [SOLVED] Loop - Find and Replace
    By ELeGault in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-10-2015, 06:45 PM
  3. Find & Replace Loop Help Needed
    By bryanmarks in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-29-2014, 10:19 AM
  4. Need VBA for concatenate, find and replace, then remove duplicate
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-15-2013, 03:43 PM
  5. updating find and replace values in a macro loop
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-10-2013, 03:25 AM
  6. Excel 2007 : Find and replace loop
    By chrisrabkin in forum Excel General
    Replies: 1
    Last Post: 10-18-2011, 05:58 PM
  7. loop through data twice & remove row if duplicate values are found
    By smokebreak in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-22-2010, 02:29 PM

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