Search : in
By :

Comparing two excel sheets

Last answer on Nov 11, 2009 9:32:45 pm GMT sanjay, on Jul 15, 2009 9:21:23 am BST 
 Report this message to moderators

Hello,

i have two excel sheets, one sheet has 100 email ids, the other have 200 email ids, the scenario is i want to know the common email ids from both the sheets. how to compare and get the result.

Thanks
Sanjay

Configuration: Windows XP Internet Explorer 7.0

Best answers for « comparing two excel sheets » in :
Excel – Comparing cell A1 to entire A column in Sheet 2 ShowExcel – Comparing cell A1 to entire A column in Sheet 2 Issue Solution Note Issue I have been trying to compare sheet1 A2 to sheet2 A2 through A500 and if it exists somewhere in sheet2's a col then copy that entire row to a new sheet....
How to freeze a row in an excel sheet ShowHow to freeze a row in an excel sheet To freeze a line in an excel sheet, for example line 1: Select line 2. Go to menu Window¯ and select Freeze panes¯.
Create an Attendance Report with Excel sheet ShowCreate an Attendance Report with Excel sheet Issue Solution Issue In the case you want to create an attendance report with Excel , here below you will find a nice example: Consider that your report will have the following...
Networking - 3-Tier Client/Server Architecture ShowIntroduction to 2-Tier Architecture 2-tier architecture is used to describe client/server systems where the client requests resources and the server responds directly to the request, using its own resources. This means that the server does not...

1

venkat1926, on Jul 15, 2009 12:03:18 pm BST
  • +1

The assumption are that the email addresses are in A2 down both in sheet 1 and sheet 2
sheet 1
email
a
d
g
k

sheet 2
email
a
s
d
f
g
h
j
k
l

the macro is (modify to suit you)

Sub test()
Dim rng As Range, c As Range, cfind As Range
On Error Resume Next
Worksheets("sheet3").Cells.Clear
With Worksheets("sheet1")
Set rng = Range(.Range("A2"), .Range("a2").End(xlDown))
For Each c In rng
With Worksheets("sheet2")
Set cfind = .Columns("A:A").Cells.Find _
    (what:=c.Value, lookat:=xlWhole)
If cfind Is Nothing Then GoTo line1
cfind.Copy Worksheets("sheet3").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)
End With 'sheet 2
line1:
Next c
application.cutcopymode=false 
End With 'sheet 1


End Sub


aftr running the macro the result will be in sheet 3 as follows


a
d
g
k

Reply to venkat1926

3

 cologuy, on Oct 14, 2009 6:49:48 pm BST

How can I change the VB so it does the same comparison across four worksheets?

Reply to cologuy

2

XLComparator, on Aug 14, 2009 8:58:13 pm BST
  • +2

An other way to easily solve your problem :
http://www.xlcomparator.net/
It's free and no macro coding is necessary.

Reply to XLComparator