Home |
Search |
Today's Posts |
#2
![]() |
|||
|
|||
![]()
I use the following to compare a block of cells on two sheets. Maybe you can
adapt it to compare two files? Sub auditIt() ' 'this routine compares the first 50 rows/columns of sheet "Original" 'to the same range in sheet "Updated" and marks changed cells in yellow/bold. 'A summary is recorded in sheet "Audit" with the location of changed cells and the before/after values k = 1 For i = 1 To 50 For j = 1 To 50 Sheets("Original").Select o = Cells(i, j) Sheets("Updated").Select u = Cells(i, j) If o < u Then Cells(i, j).Select With Selection.Interior .ColorIndex = 6 .Pattern = xlSolid End With Selection.Font.Bold = True Sheets("Audit").Select Cells(k, 1) = i Cells(k, 2) = j Cells(k, 3) = o Cells(k, 4) = u k = k + 1 End If Next j Next i End Sub -- Gary's Student "Geert Overbosch" wrote: I have received an updated version of an Excel data file, and I would like to compare the new file to the old to see where changes have been made. How can I compare the contents of the two Excel files and detect differences? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? | Excel Discussion (Misc queries) | |||
Opening DBF files with Excel 2003 via Windows Explorer ? | Setting up and Configuration of Excel | |||
Linking Excel files -- I cannot find an answer anywhere. | Excel Discussion (Misc queries) | |||
error opening excel 2000 files | Excel Discussion (Misc queries) | |||
Why do my links break when I burn multiple Excel files to a CD? | Excel Worksheet Functions |