ColumnDifferences Method
Applies To
Range object.
Description
Returns a Range object that represents all the cells whose contents are different from the comparison cell in each column.
Syntax
expression.ColumnDifferences(Comparison)
expression Required. An expression that returns a Range object containing the cells to compare.
Comparison Required Variant. A single cell to compare to the specified range.
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