R
ryguy7272
For several weeks the macro below worked fine:
Sub Compare2Shts()
For Each Cell In Worksheets("Primary").UsedRange
If Cell.Value <> Worksheets("Secondary").Range(Cell.Address) Then
Cell.Interior.ColorIndex = 3
End If
Next
For Each Cell In Worksheets("Secondary").UsedRange
If Cell.Value <> Worksheets("Primary").Range(Cell.Address) Then
Cell.Interior.ColorIndex = 3
End If
Next
End Sub
It would compare values in two sheets, and highlight any differences in red.
Today, all of a sudden, it just started erroring out at this line:
If Cell.Value <> Worksheets("Secondary").Range(Cell.Address) Then
I get a message saying “Run-time error 13â€. This is quite bizarre because,
as far as I can tell, nothing changed in the data set. Does anyone have any
suggestions as to what may cause this?
Kind Regards,
Ryan---
Sub Compare2Shts()
For Each Cell In Worksheets("Primary").UsedRange
If Cell.Value <> Worksheets("Secondary").Range(Cell.Address) Then
Cell.Interior.ColorIndex = 3
End If
Next
For Each Cell In Worksheets("Secondary").UsedRange
If Cell.Value <> Worksheets("Primary").Range(Cell.Address) Then
Cell.Interior.ColorIndex = 3
End If
Next
End Sub
It would compare values in two sheets, and highlight any differences in red.
Today, all of a sudden, it just started erroring out at this line:
If Cell.Value <> Worksheets("Secondary").Range(Cell.Address) Then
I get a message saying “Run-time error 13â€. This is quite bizarre because,
as far as I can tell, nothing changed in the data set. Does anyone have any
suggestions as to what may cause this?
Kind Regards,
Ryan---