View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
excelent excelent is offline
external usenet poster
 
Posts: 695
Default common numbers in 2 columns

compare column B with A and color all cells ind A equal to cells in B

Sub dub()
Dim r As Single, s As Single
Range("a1:a3000").Interior.ColorIndex = xlNone
For r = 1 To 800
For s = 1 To 3000
If Cells(r, 2) = Cells(s, 1) Then If Cells(r, 2) < "" Then Cells(s,
1).Interior.ColorIndex = 3
Next
Next