+ Reply to Thread
Results 1 to 6 of 6

Highlighting unique values (2003)

  1. #1
    Registered User
    Join Date
    02-28-2008
    Posts
    15

    Highlighting unique values (2003)

    I've been searching the site and whilst i can find many similar problems with solutions I simply don't have the ability to ammend them to suits my needs.

    I have two column of data, A & C, and if a value appears in A but not in C or in C but not in A then I want to highlight the cell.

    I don't want the values pulled out or pasted somewhere else, I just want them highlighted.

    Ideally the solution will be in VBA so that I can integrate it into the other macros I have found on this site :-)

    The two columns are different lengths (if it matters).


    Thanks to anyone who takes the time to consider this.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good morning Cram

    Something like this seems to work OK. When run it will prompt for a range 1 - highlight your range in column A. When asked for range 2 select the range in column C. The unique items will then be coloured yellow (ColorIndex 6) :

    Please Login or Register  to view this content.
    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Registered User
    Join Date
    02-28-2008
    Posts
    15
    Cheers Dom, that does EXACTLY what i was looking for. I could never have solved that myself!

    Thank you!

  4. #4
    Registered User
    Join Date
    02-28-2008
    Posts
    15
    Is ther a way to do it without the input boxes?

    It don't forsee it going further than row 100.

    Ta

  5. #5
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi Cram
    Quote Originally Posted by Cram
    Is ther a way to do it without the input boxes?
    Try this updated code. It should detect where your last cell is, and just work on the range. Take note, that it assumes that your sheet works from cell A1 (Cells(1,1)) and cell C1 (Cells(1,3)), which it may not :
    Please Login or Register  to view this content.
    HTH

    DominicB

  6. #6
    Registered User
    Join Date
    02-28-2008
    Posts
    15
    Quality!!!

    Thats perfect, just tweaked the Ranges and it works a treat.

    Thanks again.

+ 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