Comparison between two excel sheet
Solved/Closed
Related:
- Comparison between two excel sheet
- Compare two worksheets and paste differences to another sheet - excel vba free download ✓ - Excel Forum
- How to screenshot excel sheet - Guide
- Excel date format dd.mm.yyyy - Guide
- How to copy data from one sheet to another in excel automatically - Guide
- Unit conversion excel sheet free download - Download - Spreadsheets
2 replies
venkat1926
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
810
Nov 3, 2009 at 10:19 PM
Nov 3, 2009 at 10:19 PM
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
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.
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.