+ Reply to Thread
Results 1 to 3 of 3

Highlight unique cells on two different worksheet ranges

Hybrid View

  1. #1
    Registered User
    Join Date
    01-27-2014
    Location
    Fresno, USA
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: Highlight unique cells on two different worksheet ranges

    Yes, I could do something like this:

    Sub Unique()
     'lastrows
      lrU = Sheets("Sheet1").Cells(Rows.count, 1).End(xlUp).Row
      lrPT = Sheets("Sheet2").Cells(Rows.count, "N").End(xlUp).Row
      
      Sheets("Sheet1").Range("DL4:DL" & lrU).Copy
      Worksheets("Sheet2").Range("N3").PasteSpecial xlPasteValues
      
      Dim rng, cell As Range
      
      Set rng = Sheets("Sheet2").Range("E3:N" & lrPT)
     
      ' Display all unique values in red.
      Dim uv As UniqueValues
      Set uv = rng.FormatConditions.AddUniqueValues
      uv.DupeUnique = xlUnique
      uv.Interior.Color = vbRed
    
    End Sub
    Which works OK.
    Last edited by surePac; 08-18-2015 at 01:21 PM. Reason: correct

+ 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] I need to set ranges for Unique values, then from those ranges pick random cells...
    By Darth269 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-21-2014, 04:45 PM
  2. Highlight unique cells that relate to another worksheet
    By Wizbit in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-25-2012, 03:31 PM
  3. Compare 2 cells in a worksheet and highlight if different?
    By loulouk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-17-2012, 01:44 PM
  4. Worksheet name ranges and how to make them reference cells in a worksheet
    By mammamia in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-10-2011, 06:36 AM
  5. Highlight noncontiguous ranges of cells
    By TrafficGuy in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-01-2011, 06:57 PM
  6. compare two Ranges in Excel and highlight the cells that are different
    By zhshqzyc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2011, 10:47 AM
  7. Conditional Format:Entry looks to mult. ranges to highlight many cells
    By Mishka1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-30-2007, 07:24 AM

Tags for this Thread

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