Creates a named range, containing one area. A range is a collection of areas; an area is a rectangular collection of cells.

 public Range CreateNamedRange(int firstRow, int firstColumn, int numRows, int numColumns, System.String rangeName)
Public Function CreateNamedRange(ByVal firstRow As Integer, ByVal firstColumn As Integer, ByVal numRows As Integer, ByVal numColumns As Integer, ByVal rangeName As String) As Range

0-based first row of the range.

0-based first column column of the range.

Number of rows in the area. Maximum: The row limit of the file format you are using.

Number of columns in the range. Maximum: The column limit of the file fortmat you are using.

The name of the new range.

A Range object.

Note that if a range named rangeName already exists in the worksheet, it will be overwritten with the new named range created by this method.

Range rng = ws.CreateNamedRange(4, 4, 15, 6, "Range1");
Dim rng As Range = ws.CreateNamedRange(4, 4, 15, 6, "Range1")