View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Compare 2 Excell Sheets

Here is a demo that may help you:

Sub markup()
Dim found As String
Set r1 = Sheets("Sheet1").UsedRange
r1.ClearComments
Set r2 = Sheets("Sheet2").UsedRange
For Each rr1 In r1
v = rr1.Value
If IsEmpty(v) Then
Else
found = "Not "
For Each rr2 In r2
If v = rr2.Value Then
found = ""
End If
Next
rr1.AddComment
rr1.Comment.Visible = True
rr1.Comment.Text Text:=found & "found"
End If
Next
End Sub
--
Gary's Student


"vijaydsk1970" wrote:

I have 2 Excell sheets with 20 colums and 20000 rows in it.
I need a formula which should chekup the cell A1 value in sheet 1 and search
in Sheets 2 from top to bottom, if it founds it should put a remark
"matched", and if it not matches, "un matched" and like wise the entire
sheet1.

Thanks in advance