Search : in
By :

Comparison between two excel sheet

Last answer on Nov 4, 2009 3:19:42 am GMT dhiraj, on Nov 4, 2009 12:41:20 am GMT 
 Report this message to moderators

Hello,
i have two excel sheet with same value which i need to compare every day .with in same excel sheet i can compare easyly using conditional formating but in case of comparison between two excel sheet conditional formating is not working so i just want to know vba code which compare the value sheet 1 a1 and with sheet2 a1 and if it's doesn't match then the value which is in sheet 1 a1 should show in red color .

Configuration: Windows XP Internet Explorer 6.0

Best answers for « comparison between two excel sheet » in :
How to compare 2 excel sheet and combine uniq data? Show How to compare 2 excel sheet and combine uniq data? Issue Solution Note Issue I have 2 excel sheets , A and B. There are redundant data in both sheets as well as uniq. All i want is to combine both with no redundant records. (A+B...
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...
Avoid duplicates in Excel ShowAvoid duplicates in Excel In order to avoid duplication when encoding in a column from an excel sheet: take the conditional format on the first cell under the headings (eg A2) choose the following formula:...
Download Ms Word Excel Cracker ShowMs Word Excel Craker allows recover lost or forgotten passwords for .xls and .doc reated with Microsoft Office 97, 2000, 2003, XP or other word and excel compatible programs. This application will be necessary in case you should have received an...

1

 venkat1926, on Nov 4, 2009 3:19:42 am GMT

I have given a macro below

when do you want this macro to be invoked( under what event ) or do you want to invoke th macro periodically

the macro is

Sub test()
Dim r As Range, c As Range, j As Integer, k As Integer
With Worksheets("sheet1")
Set r = Range(.Range("A1"), .Range("A1").End(xlDown))
r.Cells.Interior.ColorIndex = xlNone
For Each c In r
j = c.Row
k = c.Column
If c = Worksheets("sheet2").Cells(j, k) Then
c.Interior.ColorIndex = 3
End If
Next c
End With
End Sub


Please rememner that only if A1 or any other cells in column A of sheet 1 is same as the entry in the same address in shseet2 that cell in sheet 1 will be red. suppose the same entry in any cell in sheet1 is found in some other address in sheet 2 the original cell in sheet 1 wil Not be red.

Reply to venkat1926