NamedRange::ColumnDifferences Method (Object^)
Gets a Microsoft.Office.Interop.Excel::Range that represents all the cells whose contents are different from the comparison cell in each column.
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Parameters
- Comparison
-
Type:
System::Object^
A single cell to compare to the specified range.
Return Value
Type: Microsoft.Office.Interop.Excel::Range^A Microsoft.Office.Interop.Excel::Range that represents all the cells whose contents are different from the comparison cell in each column.
The following code example creates a NamedRange and populates cells in the range with two different values. It compares all of the cells in the NamedRange with the value of cell B5, which is 11, and selects the cells with values that do not match.
This example is for a document-level customization.
Show: