Range Properties

Name

Returns

Description

AddIndent

Variant

Set/Get whether text in a cell is automatically indented if the text alignment in a cell is set to equally distribute

Address

String

Read-only. Parameters: RowAbsolute, ColumnAbsolute, ReferenceStyle As XlReferenceStyle, [External], [RelativeTo]. Returns the address of the current range as a string in the macro's language. The type of address (reference, absolute, A1 reference style, R1C1 reference style) is specified by the parameters

AddressLocal

String

Read-only. Parameters: RowAbsolute, ColumnAbsolute, ReferenceStyle As XlReferenceStyle, [External], [RelativeTo]. Returns the address of the current range as a string in the user's language. The type of address (reference, absolute, A1 reference style, R1C1 reference style) is specified by the parameters

AllowEdit

Boolean

Read-only. Returns True if the range can be edited on a protected worksheet

Areas

Areas

Read-only. Returns an object containing the different noncontiguous ranges in the current range

Name

Returns

Description

Borders

Borders

Read-only. Returns all the individual borders around the range. Each border side can be accessed individually in the collection

Cells

Range

Read-only. Returns the cells in the current range. The Cells property will return the same range as the current range

Characters

Characters

Read-only. Parameters: [Start], [Length]. Returns all the characters in the current range, if applicable

Column

Long

Read-only. Returns the column number of the first column in the range

Columns

Range

Read-only. Returns a range of the columns in the current range

ColumnWidth

Variant

Set/Get the column width of all the columns in the range. Returns Null if the columns in the range have different widths

Comment

Comment

Read-only. Returns an object representing the range comment, if any

Count

Long

Read-only. Returns the number of cells in the current range

CountLarge

Variant

Read-only. Counts the largest value in a given range of values

CurrentArray

Range

Read-only. Returns a Range object that represents the array associated with the particular cell range, if the cell is part of an array

CurrentRegion

Range

Read-only. Returns the current region that contains the Range object. A region is defined as an area that is surrounded by blank cells

Dependents

Range

Read-only. Returns the dependents of a cell on the same sheet as the range

Direct Dependents

Range

Read-only. Returns the direct dependents of a cell on the same sheet as the range

Direct Precedents

Range

Read-only. Returns the direct precedents of a cell on the same sheet as the range

End

Range

Read-only. Parameters: Direction As XlDirection. Returns the cell at end of the region containing the Range object. Which end of the region is specified by the Direction parameter

EntireColumn

Range

Read-only. Returns the full worksheet column(s) occupied by the current range

Name

Returns

Description

EntireRow

Range

Read-only. Returns the full worksheet row(s) occupied by the current range

Errors

Errors

Read-only. Returns the Errors collection associated with the Range object

Font

Font

Read-only. Returns an object containing Font options for the text in the range

Format Conditions

Format Conditions

Read-only. Returns an object holding conditional formatting options for the current range

Formula

Variant

Set/Get the formula of the cells in the range

FormulaArray

Variant

Set/Get the array formula of the cells in the range

Formula Hidden

Variant

Set/Get whether the formula will be hidden if the workbook/worksheet is protected

FormulaLocal

Variant

Set/Get the formula of the range in the language of the user using the A1 style references

FormulaR1C1

Variant

Set/Get the formula of the range in the language of the macro using the R1C1 style references

FormulaR1C1 Local

Variant

Set/Get the formula of the range in the language of the user using the R1C1 style references

HasArray

Variant

Read-only. Returns whether a single cell range is part of an array formula

HasFormula

Variant

Read-only. Returns whether all the cells in the range contain formulas (True). If only some of the cells contain formulas, then Null is returned

Height

Variant

Read-only. Returns the height of the range

Hidden

Variant

Set/Get whether the cells in the range are hidden. Only works if the range contains whole columns or rows

Horizontal Alignment

Variant

Set/Get how the cells in the range are horizontally aligned. Use the XLHAlign constants

Hyperlinks

Hyperlinks

Read-only. Returns the collection of hyperlinks in the range

ID

String

Set/Get the ID used for the range if the worksheet is saved as a web page

IndentLevel

Variant

Set/Get the indent level for the range

Interior

Interior

Read-only. Returns an object containing options to format the inside area of the range, if applicable (for example, interior color)

Name

Returns

Description

Left

Variant

Read-only. Returns the distance from the left edge of the leftmost column in the range to the left edge of ColumnA

ListHeader Rows

Long

Read-only. Returns the number of header rows in the range

ListObject

ListObject

Returns a ListObject object

LocationIn Table

XlLocation InTable

Read-only. Returns the location of the upper-left corner of the range

Locked

Variant

Set/Get whether cells in the range can be modified if the sheet is protected. Returns Null if only some of the cells in the range are locked

MDX

String

Returns the MDX (Multidimensional Expression) that can be sent to an OLAP provider

MergeArea

Range

Read-only. Returns a range containing the merged range of the current cell range

MergeCells

Variant

Set/Get whether the current range contains merged cells

Name

Variant

Set/Get the Name object that contains the name for the range

Next

Range

Read-only. Returns the next range in the sheet

NumberFormat

Variant

Set/Get the number format associated with the cells in the range. Null if all the cells don't have the same format

NumberFormat Local

Variant

Set/Get the number format associated with the cells in the range, in the language of the end user. Null if all the cells don't have the same format

Offset

Range

Read-only. Parameters: [RowOffset], [ColumnOffset]. Returns the cell as a Range object that is the offset from the current cell as specified by the parameters. A positive RowOffset offsets the row downward. A negative RowOffset offsets the row upward. A positive ColumnOffset offsets the column to the right, and a negative ColumnOffset offsets the column to the left

Orientation

Variant

Set/Get the text orientation for the cell text. A value from -90 to 90 degrees can be specified, or use an XlOrienta-tion constant

OutlineLevel

Variant

Set/Get the outline level for the row or column range

PageBreak

Long

Set/Get how page breaks are set in the range. Use the XLPageBreak constants

Phonetic

Phonetic

Read-only. Returns the Phonetic object associated with the cell range

Name

Returns

Description

Phonetics

Phonetics

Read-only. Returns the Phonetic objects in the range

PivotCell

PivotCell

Read-only. Returns a PivotCell object that represents a cell in a PivotTable report

PivotField

PivotField

Read-only. Returns the PivotTable field associated with the upper-left corner of the current range

PivotItem

PivotItem

Read-only. Returns the PivotTable item associated with the upper-left corner of the current range

PivotTable

PivotTable

Read-only. Returns the PivotTable report associated with the upper-left corner of the current range

Precedents

Range

Read-only. Returns the range of precedents of the current cell range on the same sheet as the range

Prefix Character

Variant

Read-only. Returns the character used to define the type of data in the cell range. For example, "'" for a text label

Previous

Range

Read-only. Returns the previous range in the sheet

QueryTable

QueryTable

Read-only. Returns the query table associated with the upper-left corner of the current range

Range

Range

Read-only. Parameters: Celll, [Cell2]. Returns a Range object as defined by the Celll and optionally Cell2 parameters. The cell references used in the parameters are relative to the range. For example, Range .Range ("Al") would return the first column in the parent range, but not necessarily the first column in the worksheet

ReadingOrder

Long

Set/Get whether the text is from right-to-left (xlRTL), left-to-right (xlLTR), or context-sensitive (xlContext)

Resize

Range

Read-only. Parameters: [RowSize], [ColumnSize]. Returns a new resized range as specified by the RowSize and ColumnSize parameters

Row

Long

Read-only. Returns the row number of the first row in the range

RowHeight

Variant

Set/Get the height of the rows in the range. Returns Null if the rows in the range have different row heights

Rows

Range

Read-only. Returns a Range object containing the rows of the current range

ServerActions

Actions

Read-only. Returns the actions that can be performed on the SharePoint server for a Range object

ShowDetail

Variant

Set/Get if all the outline levels in the range are expanded. Applicable only if a summary column or row is the range

Name

Returns

Description

ShrinkToFit

Variant

Set/Get whether the cell text will automatically shrink to fit the column width. Returns Null if the rows in the range have different ShrinkToFit properties

SmartTags

SmartTags

Read-only. Returns a SmartTags object representing the identifier for the specified cell

SoundNote

SoundNote

Property is kept for backwards compatibility only

Style

Variant

Set/Get the Style object associated with the range

Summary

Variant

Read-only. Returns whether the range is an outline summary row or column

Text

Variant

Read-only. Returns the text associated with a range cell

Top

Variant

Read-only. Returns the distance from the top edge of the topmost row in the range to the top edge of Row1

UseStandard Height

Variant

Set/Get whether the row height is the standard height of the sheet. Returns Null if the rows in the range contain different heights

UseStandard Width

Variant

Set/Get whether the column width is the standard width of the sheet. Returns Null if the columns in the range contain different widths

Validation

Validation

Read-only. Returns the data validation for the current range

Value

Variant

Parameters: [RangeValueDataType]. Set/Get the value of a cell or an array of cells depending on the contents of the Range object

Value2

Variant

Set/Get the value of a cell or an array of cells depending on the contents of the Range object. No Currency or Date types are returned by Value2

Vertical Alignment

Variant

Set/Get how the cells in the range are vertically aligned. Use the XLVAlign constants

Width

Variant

Read-only. Returns the height of the range

Worksheet

Worksheet

Read-only. Returns the worksheet that has the Range object

WrapText

Variant

Set/Get whether cell text wraps in the cell. Returns Null if the cells in the range contain different text wrap properties

XPath

Xpath

Represents the XPath element of the object at the current range

0 0

Post a comment