Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default Compare 2 Excell Sheets

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

  #2   Report Post  
Posted to microsoft.public.excel.misc
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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default Compare 2 Excell Sheets

Hi,
Kindly let me know i have to paste in vba??

"Gary''s Student" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
worksheet to worksheet . . . Wayne Knazek Excel Worksheet Functions 5 September 27th 06 06:57 PM
Compare two Sheets with Conditional Formatting wayliff Excel Discussion (Misc queries) 1 January 14th 06 12:26 AM
Compare Sheets wayliff Excel Discussion (Misc queries) 0 January 13th 06 08:14 PM
Compare 2 Sheets and Extract Unique Info to a 3rd Sheet kilo1990 Excel Discussion (Misc queries) 7 December 19th 05 10:36 PM
how do i compare 2 spread sheets if the content of a cell is avai. Hayitsme Excel Worksheet Functions 1 December 16th 04 11:27 PM


All times are GMT +1. The time now is 11:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"