I have some worksheets that I need to upgrade but would like to have a way of comparing forumlas between the new and old versions to show any differences. These worksheets have very long formulas and it is very painful to check manually.
I've been able to put together (with help from reviewing posts on this list) a macro to run through a given number of rows and columns and compare cells between the two worksheets. The problem is that the comparison is on the value of the cells, not the forumlas. Can someone tell me what I am missing to be able to compare the forumlas?
'Start checking cells in Sheet2, column 1 for mismatches in Sheet1, column1
For ColCount = 1 To 100 'Loop through cells in Sheet2
For RowCount = 1 To 200 'Loop through cells in Sheet1
'If a Sheet1 row matches a Sheet2 row
If Workbooks("ChipAnalysis1.xls".Worksheets("Daily Report".Cells(ColCount, RowCount).Value <> _
Workbooks("ChipAnalysis2.xls".Worksheets("Daily Report".Cells(ColCount, RowCount).Value _
Then
Worksheets("CmpDaily Report".Cells(ColCount, RowCount).Interior.ColorIndex = 8
End If
Next 'move to next row
Next 'Move to next column
Thanks
mhamm@wii.com
I've been able to put together (with help from reviewing posts on this list) a macro to run through a given number of rows and columns and compare cells between the two worksheets. The problem is that the comparison is on the value of the cells, not the forumlas. Can someone tell me what I am missing to be able to compare the forumlas?
'Start checking cells in Sheet2, column 1 for mismatches in Sheet1, column1
For ColCount = 1 To 100 'Loop through cells in Sheet2
For RowCount = 1 To 200 'Loop through cells in Sheet1
'If a Sheet1 row matches a Sheet2 row
If Workbooks("ChipAnalysis1.xls".Worksheets("Daily Report".Cells(ColCount, RowCount).Value <> _
Workbooks("ChipAnalysis2.xls".Worksheets("Daily Report".Cells(ColCount, RowCount).Value _
Then
Worksheets("CmpDaily Report".Cells(ColCount, RowCount).Interior.ColorIndex = 8
End If
Next 'move to next row
Next 'Move to next column
Thanks
mhamm@wii.com