• Excel is a very versatile tool, as your article demonstrates.

    A couple of mods I'd like to see in your code are:

    1. Show the value from the other worksheet as a comment (saves skipping back and forth between worksheets to see what the difference that's been identified actually is). You can do this by adding these lines:

    Sheet1.Cells(RowIndex, ColIndex).AddComment "Value in worksheet " & Sheet2.Name & " is " & Sheet2.Cells(RowIndex, ColIndex).Formula

    Sheet2.Cells(RowIndex, ColIndex).AddComment "Value in worksheet " & Sheet1.Name & " is " & Sheet1.Cells(RowIndex, ColIndex).Formula

    insert the above code just after:

    ' Compare formulas, not "text" or other formatting-affected attributes.

    If Sheet1.Cells(RowIndex, ColIndex).Formula <> Sheet2.Cells(RowIndex, ColIndex).Formula Then

    NB: If you're running this multiple times on the same data you need to clear the existing comments first.

    2. If a row in one sheet doesn't exist in the other sheet, this has the effect of labelling every subsequent row as being different. It would be useful to have the option to look ahead at the next x number of rows in the dataset and use them to determine whether a row's missing, and if it is then to flag that, rather than considering every subsequent row as changed.

    Re the earlier post suggesting modifying the code to deal with different sheet names, the code in the article does already do this.

    Nick