2.2.3.46 wdelrows

Brief Information

Delete worksheet rows

Command Line Usage

1. wdelrows del:=1 skip:=9 start:=1;

2. wdelrows m:=1 r:=col(a);

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input Worksheet irng

Input

Worksheet

<active>

Specifies the source range.

Reduce Method method

Input

int

0

Reduce method.

Option list:

  • 0:del
Delete N rows, then skip M rows
  • 1:missing
Delete rows with missing values
  • 2:mask
Delete rows with masked values
Reference Column rng

Input

Range

<optional>

Delete rows according the specified reference column. Script accessible only.

Delete Rows del

Input

int

1

Number of rows to delete.

Skip Rows skip

Input

int

1

Number of rows to skip.

Starting Row(s) to Delete start

Input

int

1

Starting row to begin deletion.

Ending Row to Delete end

Input

int

-1

Ending Row to Delete. Script accessible only.

Output Worksheet orng

Output

Worksheet

<input>

The output range. See the syntax here.

Description

This X-Function deletes worksheet rows by one of the following method:

  • Delete N rows and then skip M rows.
  • Delete rows with missing values.
  • Delete rows with masked values.

By default, this function will delete the entire row if any cell in the row satisfies the condition you selected. If you want to delete rows that refer to some other columns, you should run this function by script.

Examples

  1. Create a new workbook and highlight the two columns. Right-click and select Fill Column With: Row Numbers to fill integer numbers to the columns.
  2. Select menu item Worksheet: Reduce Rows to open wdelrows X-Function dialog. Set the options as below:
    Reduce Method: Delete N rows, then skip M rows
    Delete Rows: 1
    Skip Rows: 9
    Starting Row to Delete: 1
  3. Click OK to delete rows 1, 11, 21, etc.

Related X-Functions

wdeldup