+ Reply to Thread
Results 1 to 6 of 6

Highlight common char in column A

  1. #1
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2013
    Posts
    13

    Highlight common char in column A

    Hi
    How can I highlight common char (or difference) in column A(case-insensitive)?

    for example in this sample
    A
    1 abcdefghiq
    2 abcdezghiw
    3 abcxyzghiq
    4 abcxyughiexyz

    if you compare all strings in column A , just abc and ghi is common part, So I want this result
    A
    1 abcdefghiq
    2 abcdezghiw
    3 abcxyzghiq
    4 abcxyughiexyz

    I want to compare first char of column A if all is equal highlight first char , next compare second char next ...

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

    Re: Highlight common char in column A

    Try this - select the range of cells first

    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.
    Martin

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

    Re: Highlight common char in column A

    Accidentally submitted twice

  4. #4
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: Highlight common char in column A

    Thank you mrice
    I do this and when I press Run this Error shown
    Run-time Error '9':
    Subscript out of range
    I press Debug and in VBA this line highlighted
    HTML Code: 

  5. #5
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: Highlight common char in column A

    Solved
    Thanks Martin for your GREAT help

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

    Re: Highlight common char in column A

    Suspect that you had a blank cell in your selected range.

+ 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. [SOLVED] vba - compare 2 columns highlight data not common to both
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-09-2014, 06:00 AM
  2. Replies: 6
    Last Post: 04-10-2013, 01:15 AM
  3. [SOLVED] Highlight cells that are common among several columns
    By vasu81 in forum Excel General
    Replies: 2
    Last Post: 10-05-2012, 02:00 PM
  4. Need help with sorting a column by most common to least common
    By mikenmike0001 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-06-2011, 04:28 PM
  5. macro to compare columns and highlight common rows
    By jagman1990 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-22-2010, 12:27 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