+ Reply to Thread
Results 1 to 6 of 6

Compare two sentences and highlight in different color

  1. #1
    Registered User
    Join Date
    09-11-2014
    Location
    chennai
    MS-Off Ver
    2007
    Posts
    4

    Compare two sentences and highlight in different color

    Hi all,

    I want to compare two cells in excel using macro and populate the difference after executing the macro. I have attached my compare diff.xls how my cells has to be highlighted after executing the macro.

    If any body has worked on this requesting your help in this regard.

    Thanks and in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Compare two sentences and highlight in different color

    This is a basic one, simply comparing what's in column A but not in B, and vice versa, and showing all on column C. It's not going to compare/highlight based on relative word position in the sentence (i.e. repeated words will not be detected). This just a rough one to get you going, you can make changes to your needs.
    Last edited by millz; 09-15-2014 at 11:30 AM. Reason: Removed code because apparently OP doesn't read, and most likely will not use this anyway.
    多么想要告诉你 我好喜欢你

  3. #3
    Registered User
    Join Date
    09-11-2014
    Location
    chennai
    MS-Off Ver
    2007
    Posts
    4

    Re: Compare two sentences and highlight in different color

    hi millz,

    below two columns not showing proper difference.

    Just be to change addresses in the below to match your worksheet. Just be sure to the change addresses in the lines to match worksheet.
    Since added requirements in the comments below, I modified the code to also print out the list of red-highlighted phrases in column C. If you want this list elsewhere, you'll have adjust the address in the last section of the code. I also improved code Since you added requirements in the comments below, I modified the code to also print out the list of red-highlighted phrases in column C. If you want this list elsewhere, you'll have to adjust the address in the last section of the code. I also improved the highlighting code

  4. #4
    Registered User
    Join Date
    09-11-2014
    Location
    chennai
    MS-Off Ver
    2007
    Posts
    4

    Re: Compare two sentences and highlight in different color

    hi milz,

    color marked in red not showing in the code sent

  5. #5
    Registered User
    Join Date
    09-11-2014
    Location
    chennai
    MS-Off Ver
    2007
    Posts
    4

  6. #6
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Compare two sentences and highlight in different color

    Good luck sir, anyone who has read your posts in one of the other cross posts most likely is not going to help too. I am out.

+ 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. Compare and highlight
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-02-2014, 02:03 AM
  2. [SOLVED] Compare and highlight
    By rizmomin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-13-2014, 10:53 PM
  3. Find a requested word within sentences and output those sentences elsewhere
    By swfred2000 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-19-2014, 02:24 PM
  4. [SOLVED] compare 2 columns, highlight color if not same value?
    By ChristopherH in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-26-2014, 12:48 PM
  5. [SOLVED] Compare and Highlight
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-10-2012, 10:45 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