DeleteRange

Delete cells from one or all sheets.

Overloads

Overload Name Description
General Delete cells.


General

Delete cells.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
DeleteRange The address of the cells to delete.
ShiftDirection The shift mode for the delete.
Warning: ShiftEntireRow and ShiftEntireColumn do not work correctly. Use ShiftEntireRowExcel and ShiftEntireColumnExcel to get the correct result.
ShiftEntireColumn performs the same as ShiftLeft (incorrect).
ShiftEntireRow performs the same as ShiftUp (incorrect).
Using ShiftLeft will move the cells to the right of any cells in the specified range to the left.
Using ShiftUp will move the cells below of any cells in the specified range up.
Using ShiftEntireColumnExcel will delete the entire column of any cells in the sprecified range.
Using ShiftEntireRowExcel will delete the entire row of any cells in the sprecified range.
Specify one of the following values or an arbitrary value: <blank>ShiftLeftShiftUpShiftEntireRowShiftEntireRowExcelShiftEntireColumnShiftEntireColumnExcel
VisibleOnly (7.4) Set this to TRUE to prohibit deleting hidden rows or columns. The default is FALSE.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE