Range Members

Include Protected Members
Include Inherited Members

Represents a cell, a row, a column, a selection of cells containing one or more contiguous blocks of cells, or a 3-D range.

The Range type exposes the following members.

Properties

  Name Description
Public property _Default Reserved for internal use.
Public property AddIndent Determines if text is automatically indented when the text alignment in a cell is set to equal distribution either horizontally or vertically.
Public property Address Returns the range reference.
Public property AddressLocal Returns the range reference for the specified range in the language of the user.
Public property AllowEdit Determines if the range can be edited on a protected worksheet.
Public property Application Returns an Application object that represents the Microsoft Excel application.
Public property Areas Returns an Areas collection that represents all the ranges in a multiple-area selection.
Public property Borders Returns a Borders collection that represents the borders of a style or a range of cells (including a range defined as part of a conditional format).
Public property Cells Returns a Range object that represents the cells in the specified range.
Public property Characters Returns a Characters object that represents a range of characters within the object text.
Public property Column Returns the number of the first column in the first area in the specified range.
Public property Columns Returns a Range object that represents the columns in the specified range.
Public property ColumnWidth Returns or sets the width of all columns in the specified range.
Public property Comment Returns a Comment object that represents the comment associated with the cell in the upper-left corner of the range.
Public property Count Returns the number of objects in the collection.
Public property CountLarge Counts the largest value in a given Range of values. Read-only.
Public property Creator Returns a 32-bit integer that indicates the application in which this object was created.
Public property CurrentArray If the specified cell is part of an array, returns a Range object that represents the entire array.
Public property CurrentRegion Returns a Range object that represents the current region.
Public property Dependents Returns a Range object that represents the range containing all the dependents of a cell.
Public property DirectDependents Returns a Range object that represents the range containing all the direct dependents of a cell.
Public property DirectPrecedents Returns a Range object that represents the range containing all the direct precedents of a cell.
Public property DisplayFormat Gets a DisplayFormat object that represents the display settings for the specified range.
Public property End Returns a Range object that represents the cell at the end of the region that contains the source range.
Public property EntireColumn Returns a Range object that represents the entire column (or columns) that contains the specified range.
Public property EntireRow Returns a Range object that represents the entire row (or rows) that contains the specified range.
Public property Errors Allows the user to access error checking options.
Public property Font Returns a Font object that represents the font of the specified object.
Public property FormatConditions Returns a FormatConditions collection that represents all the conditional formats for the specified range.
Public property Formula Returns or sets the object's formula in A1-style notation and in the language of the macro.
Public property FormulaArray Returns or sets the array formula of a range.
Public property FormulaHidden Determines if the formula will be hidden when the worksheet is protected.
Public property FormulaLabel Returns or sets the formula label type for the specified range.
Public property FormulaLocal Returns or sets the formula for the object, using A1-style references in the language of the user.
Public property FormulaR1C1 Returns or sets the formula for the object, using R1C1-style notation in the language of the macro.
Public property FormulaR1C1Local Returns or sets the formula for the object, using R1C1-style notation in the language of the user.
Public property HasArray Determines if the specified cell is part of an array formula.
Public property HasFormula Determines if all cells in the range contain formulas.
Public property Height The height of the range.
Public property Hidden Determines if the rows or columns are hidden.
Public property HorizontalAlignment Returns or sets the horizontal alignment for the specified object.
Public property Hyperlinks Returns a Hyperlinks collection that represents the hyperlinks for the range.
Public property ID Returns or sets the identifying label for the specified cell when the page is saved as a Web page.
Public property IndentLevel Returns or sets the indent level for the cell or range.
Public property Interior Returns an Interior object that represents the interior of the specified object.
Public property Item Returns a Range object that represents a range at an offset to the specified range.
Public property Left The distance from the left edge of column A to the left edge of the range.
Public property ListHeaderRows Returns the number of header rows for the specified range.
Public property ListObject Returns a ListObject object for the Range object or QueryTable object.
Public property LocationInTable Returns a constant that describes the part of the PivotTable report that contains the upper-left corner of the specified range.
Public property Locked Determines if the object is locked.
Public property MDX Returns the MDX name for the specified Range object. Read-only.
Public property MergeArea Returns a Range object that represents the merged range containing the specified cell.
Public property MergeCells Determines if the range or style contains merged cells.
Public property Name Returns or sets the name of the object.
Public property Next Returns a Range object that represents the next cell.
Public property NumberFormat Returns or sets the format code for the object.
Public property NumberFormatLocal Returns or sets the format code for the object as a string in the language of the user.
Public property Offset Returns a Range object that represents a range that’s offset from the specified range.
Public property Orientation Returns the text orientation.
Public property OutlineLevel Returns or sets the current outline level of the specified row or column.
Public property PageBreak Returns or sets the location of a page break.
Public property Parent Returns the parent object for the specified object.
Public property Phonetic Returns the Phonetic object which contains information about a specific phonetic text string in a cell.
Public property Phonetics Returns the Phonetics collection of the range.
Public property PivotCell Returns a PivotCell object that represents a cell in a PivotTable report.
Public property PivotField Returns a PivotField object that represents the PivotTable field containing the upper-left corner of the specified range.
Public property PivotItem Returns a PivotItem object that represents the PivotTable item containing the upper-left corner of the specified range.
Public property PivotTable Returns a PivotTable object that represents the PivotTable report containing the upper-left corner of the specified range, or the PivotTable report associated with the PivotChart report.
Public property Precedents Returns a Range object that represents all the precedents of a cell.
Public property PrefixCharacter Returns the prefix character for the cell.
Public property Previous Returns a Range object that represents the previous cell.
Public property QueryTable Returns a QueryTable object that represents the query table that intersects the specified Range object.
Public property Range Returns a Range object that represents a cell or a range of cells.
Public property ReadingOrder Returns or sets the reading order for the specified object.
Public property Resize Resizes the specified range.
Public property Row Returns the number of the first row of the first area in the range.
Public property RowHeight Returns the height of all the rows in the range specified, measured in points.
Public property Rows Returns a Range object that represents the rows in the specified range.
Public property ServerActions Specifies the actions that can be performed on the SharePoint server for a Range object.
Public property ShowDetail Returns True if the outline is expanded for the specified range (so that the detail of the column or row is visible).
Public property ShrinkToFit Determines if text automatically shrinks to fit in the available column width.
Public property SmartTags Returns a SmartTags object representing the identifier for the specified cell.
Public property SoundNote This property should not be used. Sound notes have been removed from Microsoft Excel.
Public property SparklineGroups Gets a SparklineGroups object that represents an existing group of sparklines from the specified range.
Public property Style Returns a Style object that represents the style of the specified range.
Public property Summary Determines if the range is an outlining summary row or column.
Public property Text Returns or sets the text for the specified object.
Public property Top Returns the distance, in points, from the top edge of row 1 to the top edge of the range.
Public property UseStandardHeight Determines if the row height of the Range object equals the standard height of the sheet.
Public property UseStandardWidth Determines if the column width of the Range object equals the standard width of the sheet.
Public property Validation Returns the Validation object that represents data validation for the specified range.
Public property Value Returns or sets the value of the specified range.
Public property Value2 Returns or sets the cell value.
Public property VerticalAlignment Returns or sets the vertical alignment of the specified object.
Public property Width The width, in points, of the range.
Public property Worksheet Returns a Worksheet object that represents the worksheet containing the specified range.
Public property WrapText Determines if Microsoft Excel wraps the text in the object.
Public property XPath Returns an XPath object that represents the Xpath of the element mapped to the specified Range object.

Top

Methods

  Name Description
Public method _PasteSpecial Reserved for internal use.
Public method _PrintOut Reserved for internal use.
Public method Activate Activates a single cell, which must be inside the current selection.
Public method AddComment Adds a comment to the range.
Public method AdvancedFilter Filters or copies data from a list based on a criteria range.
Public method AllocateChanges Performs a writeback operation for all edited cells in a range based on an OLAP data source.
Public method ApplyNames Applies names to the cells in the specified range.
Public method ApplyOutlineStyles Applies outlining styles to the specified range.
Public method AutoComplete Returns an AutoComplete match from the list.
Public method AutoFill Performs an autofill on the cells in the specified range.
Public method AutoFilter Filters a list using the AutoFilter.
Public method AutoFit Changes the width of the columns in the range or the height of the rows in the range to achieve the best fit.
Public method AutoFormat Automatically formats the specified range, using a predefined format.
Public method AutoOutline Automatically creates an outline for the specified range.
Public method BorderAround Adds a border to a range and sets the Color, LineStyle, and Weight properties for the new border.
Public method BorderAround2 Reserved for internal use.
Public method Calculate Calculates a specified range of cells on a worksheet.
Public method CalculateRowMajorOrder Calculates a specfied range of cells.
Public method CheckSpelling Checks the spelling of an object.
Public method Clear Clears the entire object.
Public method ClearComments Clears all cell comments from the specified range.
Public method ClearContents Clears the formulas from the range.
Public method ClearFormats Clears the formatting of the object.
Public method ClearHyperlinks Removes all hyperlinks from the specified range.
Public method ClearNotes Clears notes and sound notes from all the cells in the specified range.
Public method ClearOutline Clears the outline for the specified range.
Public method ColumnDifferences Returns a Range object that represents all the cells whose contents are different from the comparison cell in each column.
Public method Consolidate Consolidates data from multiple ranges on multiple worksheets into a single range on a single worksheet.
Public method Copy Copies the range to the specified range or to the Clipboard.
Public method CopyFromRecordset Copies the contents of an ADO or DAO Recordset object onto a worksheet, beginning at the upper-left corner of the specified range.
Public method CopyPicture Copies the selected object to the Clipboard as a picture.
Public method CreateNames Creates names in the specified range, based on text labels in the sheet.
Public method CreatePublisher You have requested Help for a keyword used only on the Macintosh. For information about this keyword, consult the language reference Help included with Microsoft Office Macintosh Edition.
Public method Cut Cuts the object to the Clipboard or pastes it into a specified destination.
Public method DataSeries Creates a data series in the specified range.
Public method Delete Deletes the object.
Public method DialogBox Displays a dialog box defined by a dialog box definition table on a Microsoft Excel 4.0 macro sheet.
Public method Dirty Designates a range to be recalculated when the next recalculation occurs.
Public method DiscardChanges Discards all changes in the edited cells of the range.
Public method EditionOptions You have requested Help for a keyword used only on the Macintosh. For information about this keyword, consult the language reference Help included with Microsoft Office Macintosh Edition.
Public method ExportAsFixedFormat Exports to a file of the specified format.
Public method FillDown Fills down from the top cell or cells in the specified range to the bottom of the range.
Public method FillLeft Fills left from the rightmost cell or cells in the specified range.
Public method FillRight Fills right from the leftmost cell or cells in the specified range.
Public method FillUp Fills up from the bottom cell or cells in the specified range to the top of the range.
Public method Find Finds specific information in a range and returns a Range object that represents the first cell where that information is found.
Public method FindNext Continues a search that was begun with the Find method.
Public method FindPrevious Continues a search that was begun with the Find method.
Public method FunctionWizard Starts the Function Wizard for the upper-left cell of the range.
Public method GetEnumerator() (Inherited from IEnumerable.)
Public method GetEnumerator()
Public method GoalSeek Calculates the values necessary to achieve a specific goal.
Public method Group When the Range object represents a single cell in a PivotTable field’s data range, the Group method performs numeric or date-based grouping in that field.
Public method Insert Inserts a cell or a range of cells into the worksheet or macro sheet and shifts other cells away to make space.
Public method InsertIndent Adds an indent to the specified range.
Public method Justify Rearranges the text in a range so that it fills the range evenly.
Public method ListNames Pastes a list of all displayed names onto the worksheet, beginning with the first cell in the range.
Public method Merge Creates a merged cell from the specified Range object.
Public method NavigateArrow Navigates a tracer arrow for the specified range to the precedent, dependent, or error-causing cell or cells.
Public method NoteText Returns or sets the cell note associated with the cell in the upper-left corner of the range.
Public method Parse Parses a range of data and breaks it into multiple cells.
Public method PasteSpecial Pastes a Range from the Clipboard into the specified range.
Public method PrintOut Prints the object.
Public method PrintOutEx Reserved for internal use.
Public method PrintPreview Shows a preview of the object as it would look when printed.
Public method RemoveDuplicates Removes duplicate values from a range of values.
Public method RemoveSubtotal Removes subtotals from a list.
Public method Replace Returns a Boolean indicating characters in cells within the specified range.
Public method RowDifferences Returns a Range object that represents all the cells whose contents are different from those of the comparison cell in each row.
Public method Run Runs the Microsoft Excel macro at this location.
Public method Select Selects the object.
Public method SetPhonetic Creates Phonetic objects for all the cells in the specified range.
Public method Show Scrolls through the contents of the active window to move the range into view.
Public method ShowDependents Draws tracer arrows to the direct dependents of the range.
Public method ShowErrors Draws tracer arrows through the precedents tree to the cell that’s the source of the error and returns the range that contains that cell.
Public method ShowPrecedents Draws tracer arrows to the direct precedents of the range.
Public method Sort Sorts a PivotTable report, a range, or the active region if the specified range contains only one cell.
Public method SortSpecial Uses East Asian sorting methods to sort the range or a PivotTable report, or uses the method for the active region if the range contains only one cell. For example, Japanese sorts in the order of the Kana syllabary.
Public method Speak Causes the cells of the range to be spoken in row order or column order.
Public method SpecialCells Returns a Range object that represents all the cells that match the specified type and value.
Public method SubscribeTo You have requested Help for a keyword used only on the Macintosh. For information about this keyword, consult the language reference Help included with Microsoft Office Macintosh Edition.
Public method Subtotal Creates subtotals for the range (or the current region, if the range is a single cell).
Public method Table Creates a data table based on input values and formulas that you define on a worksheet.
Public method TextToColumns Parses a column of cells that contain text into several columns.
Public method Ungroup Promotes a range in an outline (that is, decreases its outline level).
Public method UnMerge Separates a merged area into individual cells.

Top

See Also

Reference

Range Interface

Microsoft.Office.Interop.Excel Namespace