+ Reply to Thread
Results 1 to 11 of 11

highlight cells with words replaced

  1. #1
    Registered User
    Join Date
    06-02-2015
    Location
    Edmonton, Alberta
    MS-Off Ver
    2013
    Posts
    5

    highlight cells with words replaced

    Hello everyone,

    I am trying to find and replace names to characters in a large data file. I am using the following code for this purpose,
    Please Login or Register  to view this content.
    However I would like to know the numbers of replacements made and highlight the cells in which replacements were made. Can anyone please help. Also is it possible to have rows with replaced cells copied to another worksheet?

    Thanks,

    Amit
    Last edited by amitsansanwal; 06-02-2015 at 02:41 PM.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: highlight cells with words replaced

    Welcome amitsansanwal,
    You certainly read the rules and you know you have to use code tags when posting code.
    Can you attach a short sample of your data to help to update the macro.
    PCI
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    06-02-2015
    Location
    Edmonton, Alberta
    MS-Off Ver
    2013
    Posts
    5

    Re: highlight cells with words replaced

    Thanks PCI, nest time I will definitely use code tags.

    My data is fairly simple, one columns has generic names, such as John, Jack etc and another has asterisk to replace the names with.

    Third column has a lot of text in each cells, I have to replace names with asterisks in that column.

    I have around 2000 names and more than 6000 text cells.

    Wish I could upload the file but out network wont allow me.

    Thanks,

    Amit

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: highlight cells with words replaced

    "nest time I will definitely use code tags" you can do it now: Just Edit you thread and use
    Please Login or Register  to view this content.
    About your file you could reduce the amount of rows, it is just to a clear understanding of your data

  5. #5
    Registered User
    Join Date
    06-02-2015
    Location
    Edmonton, Alberta
    MS-Off Ver
    2013
    Posts
    5

    Re: highlight cells with words replaced

    Done, but I cannot uplode files.

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: highlight cells with words replaced

    "numbers of replacements made " for each word or only the full total?

  7. #7
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: highlight cells with words replaced

    See here a piece of code
    Not sure it fits to what you need but it has been prepared from you previous code
    Where to put the counter value ???

    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    06-02-2015
    Location
    Edmonton, Alberta
    MS-Off Ver
    2013
    Posts
    5

    Re: highlight cells with words replaced

    Thank you very much for doing this, i will try it out.

    However I am also having issues with finding the whole worlds, for example, my find value is "Al" and I am replacing it with * then the the code replaces "al' with in "Pal" and it becomes P*. Whereas, I would like it to only replace the actual name "Al". This is happening when I am chosing xlPart

    When I chose xlWhole then the code does nothing because the cell contains more test than just the name, for example it wont replace Al with * if it reads "Al is a good person" and not just Al.

    Any help?

  9. #9
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: highlight cells with words replaced

    How do we know we have to replace when there is
    "Pal" or "Al is a good person"
    is it the space (before and after Al) which makes the difference?

  10. #10
    Registered User
    Join Date
    06-02-2015
    Location
    Edmonton, Alberta
    MS-Off Ver
    2013
    Posts
    5

    Re: highlight cells with words replaced

    Yes the space does make the difference.

  11. #11
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: highlight cells with words replaced

    After testing the file, it will be good you prepare a test file with some data like the one you shown to do some tests and update the macro.

+ 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. Trying to Highlight Cells with Searchable Words in a Particular Column
    By iekika13 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-13-2014, 07:01 PM
  2. VBA code to highlight individual changed words within Cells
    By marky571 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-07-2013, 09:23 AM
  3. how to find words in multiple excel files and replaced !?
    By termal in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-31-2012, 02:17 PM
  4. Need to highlight particular words in different cells
    By Tannerx007 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-10-2012, 03:58 PM
  5. Highlight the replaced Cell
    By liarliar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2008, 12:43 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