View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default To Find Unmatched data in a Column

Place this in C2 ( or whatever is starting row) and copy down

=IF(ISNA(MATCH(A2,B:B,0)),"No match","")

OR

try this macro which highlights (colurs RED) non-matched cells in A :


Sub NoMatch()
Dim r As Long, lastrow As Long
Dim res As Variant
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
For r = 2 To lastrow
res = Application.Match(Cells(r, "A"), Range("B:B"), 0)
If IsError(res) Then
Cells(r, "A").Interior.ColorIndex = 3
End If
Next r
End Sub

HTH

"Himani" wrote:

Presenting a shortened version of the problem. I have two columns:

Column A Column B

114203 114203
114204 114205
114205 114206
114206 114207
114207 114208
114208 114209
114209 114210
114210 114211
114211 114212
114212 114218
114213
114214
114216
114217
114218
There are approximately 10,0000 lines and I need to find the unmatched
data in Column A. Can anybody please help.