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