RowDifferences Method

Applies To

Range Object.

Description

Accessor. Returns a Range object representing all the cells whose contents are different than the comparison cell in each of the rows. The comparison cell is a cell in the comparison column and is equal to the comparison argument.

Syntax

object.RowDifferences(comparison)

object

Required. The object to which this method applies.

comparison

Required. A cell in the comparison column. Use the ActiveCell property if you are finding the differences between the active cell's column and all rows in the range.

See Also

ColumnDifferences Method.

Example

This example selects the cells in row one on Sheet1 whose contents are different from cell D1.


Worksheets("Sheet1").Activate
Set c1 = ActiveSheet.Rows(1).RowDifferences( _
    comparison:=ActiveSheet.Range("D1"))
c1.Select