View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.newusers
Wowbagger Wowbagger is offline
external usenet poster
 
Posts: 7
Default Spotting the difference between two colums of text

Thank you for your response.

I have stumbled upon this link -
http://office.microsoft.com/en-us/ex...039151033.aspx - that has
something even easier. (I don't know if it works with versions prior to
Office 2007)

=ISNA(MATCH(E3,$I$3:$I$14,FALSE)).

Oh, if only everything could be this simple!



"Dave" wrote in message
...
Hi Wowbagger,
I don't know if there's a worksheet function to do what you want, but
the following code, pasted into a module of your workbook will find
all data common to both columns, and turn them red. The non-red cells
will be the ones not found in both colomns.
I have assumed that there is a blank cell at the end of both columns,
but they do not have to be of equal length.
I have assumed that your data starts in Row 1. If not, change A and B
accordingly, as notorised.
The code does not tell you if a number appears more than once in the
same column. This could be easily added.
Regards - Dave.

Sub check_Duplicates()
A = 1 '1st row number of first column
B = 1 '1st row number of second column
Do Until Cells(A, 1).Value = ""
Do Until Cells(B, 2).Value = ""
If Cells(A, 1) = Cells(B, 2) Then
Cells(A, 1).Font.ColorIndex = 3
Cells(B, 2).Font.ColorIndex = 3
Exit Do
End If
B = B + 1
Loop
B = 1
A = A + 1
Loop
End Sub