Click or drag to resize

ExcelRange Methods

The ExcelRange type exposes the following members.

Methods
  NameDescription
Public methodAddComment
Adds the comment with the specified text to this range. The range is expected to contain a single cell otherwise the comment will be placed on the top left cell of the range.
Public methodAutofitColumns
Changes the width of the range columns to achieve the best fit for the cells content.
Public methodAutofitRows
Changes the height of the range rows to achieve the best fit for the cells content.
Public methodClear
Clears the range content and the cells formatting
Public methodClearContents
Clears the range content but leaves the cells formatting
Public methodCopy
Copies this range to the specified destination range.
Public methodDelete
Deletes the cell in the range and shifts cells up to replace the deleted cells.
Public methodDelete(ExcelDeleteShiftDirection)
Deletes the cell in the range and shifts cells in the specified direction to replace the deleted cells.
Public methodFreezePanes
Freezes panes to keep row and column labels visible when the worksheet is scrolled. To lock rows select the row below where you want the freeze to appear (e.g. The range "A5" will freeze the rows from 1 to 4). To lock columns select the column to the right of where you want the split to appear (e.g. The range "D1" will freeze the columns A, B and C). To lock both rows and columns select the cell below and to the right of where you want the split to appear (e.g. The range "D5" will freeze the rows from 1 to 4 and the columns A, B and C).
Public methodGroup(ExcelGroupBy)
Groups the range by rows or columns function of the groupBy parameter.
Public methodGroup(ExcelGroupBy, Boolean)
Groups the range by rows or columns function of the groupBy parameter.
Public methodMerge
Merge the cells in this range in a merged area.
Public methodMove
Moves the range to the specified destination range.
Public methodUnGroup
Ungroups the range.
Public methodUnMerge
Separates a merged range into individual cells.
Top
See Also