Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compare and Highlight
I need help figuring out how to do the following.
I have 2 work books "Book1" and "Book2" Columns A & B of Sheet1 in both workbooks contain First Names and Last Names. I want to compare the workbooks and if the name in Book1 appears in Book2 I want it highlighted in Book1. Is this possible? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compare and Highlight
Try this:
Sub Compare2Shts() For Each Cell In Worksheets("CompareSheet#1").UsedRange If Cell.Value < Worksheets("CompareSheet#2").Range(Cell.Address) Then Cell.Interior.ColorIndex = 3 End If Next For Each Cell In Worksheets("CompareSheet#2").UsedRange If Cell.Value < Worksheets("CompareSheet#1").Range(Cell.Address) Then Cell.Interior.ColorIndex = 3 End If Next End Sub Sub CompareAnother2Shts() For Each Cell In Worksheets("CompareSheet#1").Range("A1:J50") If Cell.Value < Worksheets("CompareSheet#2").Range(Cell.Address) Then Cell.Interior.ColorIndex = 3 End If Next For Each Cell In Worksheets("CompareSheet#2").Range("A1:J50") If Cell.Value < Worksheets("CompareSheet#1").Range(Cell.Address) Then Cell.Interior.ColorIndex = 3 End If Next End Sub Regards, Ryan--- -- RyGuy "SarahJ" wrote: I need help figuring out how to do the following. I have 2 work books "Book1" and "Book2" Columns A & B of Sheet1 in both workbooks contain First Names and Last Names. I want to compare the workbooks and if the name in Book1 appears in Book2 I want it highlighted in Book1. Is this possible? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Compare & highlight changes between two worksheets? | Excel Worksheet Functions | |||
Compare and highlight | Excel Programming | |||
Compare and Highlight Rows | New Users to Excel | |||
Compare and Highlight Differences | Excel Programming | |||
Compare Two Worksheets and Highlight Changes | Excel Programming |