Comparing Updated files
Absolutely !! The structure must be the same ! If rows/columns are
added/deleted there will be a huge pile of mis-matches
--
Gary''s Student - gsnu200733
"Toppers" wrote:
Does this not assume (which may correct!) that the files sizes (row and/or
columns) are the same?
"Gary''s Student" wrote:
Assume we have two files, new.xls and old.xls.
Each has a sheet named s1. Open both files and run:
Sub checkdif()
Set wbo = Workbooks("old.xls")
Set wbn = Workbooks("new.xls")
Set so = wbo.Sheets("s1")
Set sn = wbn.Sheets("s1")
For Each r In sn.UsedRange
vn = r.Value
vo = so.Range(r.Address).Value
If vo < vn Then
r.Interior.ColorIndex = 6
End If
Next
End Sub
The macro will hi-light in yellow all the cells in new.xls that are
different than old.xls
--
Gary''s Student - gsnu200733
"Bob" wrote:
Each day I receive an updated Excel file. The file is large and only minor
differences occur each day. How can I see the differences quickly or
automatically?
|