[]
Specifies the type of special cells to find within a range.
Used as a parameter for SpecialCells(SpecialCellType, SpecialCellsValue?) to locate cells matching specific criteria such as blanks, comments, constants, formulas, merged cells, and more.
public enum SpecialCellType
Public Enum SpecialCellType
worksheet.Range["A1"].Value = "Hello";
worksheet.Range["A3"].Value = 100;
worksheet.Range["B1:B3"].Formula = "=A1";
IRange blanks = worksheet.Range["A1:A3"].SpecialCells(SpecialCellType.Blanks);
IRange formulas = worksheet.Range["B1:B3"].SpecialCells(SpecialCellType.Formulas);
| Name | Description |
|---|---|
| AllFormatConditions | Cells of any format condition in the specified range. |
| AllValidation | Cells having validation criteria in the specified range. |
| Blanks | Empty cells in the specified range. |
| CellPicture | Cells containing picture-in-cell in the specified range. |
| Comments | Cells containing notes in the specified range. |
| Constants | Cells containing constants. Use the SpecialCellsValue to filter values by data types. |
| Formulas | Cells containing formulas. Use the SpecialCellsValue to filter formulas by return types. |
| LastCell | The last visible cell in the used range of the worksheet of the specified range. |
| MergedCells | Merged cells that intersect the specified range. |
| SameFormatConditions | Cells having the same format as the top-left cell of the specified range. |
| SameValidation | Cells having the same validation criteria as the top-left cell of the specified range. |
| Tags | Cells containing tags in the specified range. |
| Visible | All visible cells in the specified range. |