Returns a Range object that represents all the cells whose contents are different from those of the comparison cell in each row.
expression A variable that represents a Range object.
|Comparison||Required||Variant||A single cell to compare with the specified range.|
This example selects the cells in row one on Sheet1 whose contents are different from those of cell D1.
Dim c1 Worksheets("Sheet1").Activate Set c1 = ActiveSheet.Rows(1).RowDifferences(Comparison:=ActiveSheet.Range("D1")) c1.Select