Anyone know how to do this?
Closed
Jasmine
-
Jan 11, 2010 at 03:51 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jan 11, 2010 at 09:04 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jan 11, 2010 at 09:04 PM
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Jan 11, 2010 at 09:04 PM
Jan 11, 2010 at 09:04 PM
suppose your data is from row 2 (rows 1 is having column headings
also assume that there is not gap in the data
try this macro. If necessary modify r1 and r2. if this is ok post confiramtion
also assume that there is not gap in the data
try this macro. If necessary modify r1 and r2. if this is ok post confiramtion
Sub test() Dim r1 As Range, c1 As Range, r2 As Range, cfind As Range, x On Error Resume Next Set r1 = Range(Range("A2"), Range("A2").End(xlDown)) Set r2 = Range(Range("B2"), Range("B2").End(xlDown)) For Each c1 In r1 x = c1.Value Set cfind = r2.Cells.Find(what:=x, lookat:=xlWhole) If cfind Is Nothing Then c1.Interior.ColorIndex = 6 Next c1 End Sub