ColumnDifferences Method

Applies To

Range Object.

Description

Accessor. Returns a Range object that represents all the cells whose contents are different than the comparison cell in each column. The comparison cell is the one in the same row as comparison.

Syntax

object.ColumnDifferences(comparison)

object

Required. The range containing the cells to compare.

comparison

Required. A cell in the comparison row.

See Also

RowDifferences Method.

Example

This example selects the cells in column A on Sheet1 whose contents are different from cell A4.


Worksheets("Sheet1").Activate
Set r1 = ActiveSheet.Columns("A").ColumnDifferences( _
    comparison:=ActiveSheet.Range("A4"))
r1.Select