To use your named range in a formula, simply start typing the formula in a cell. When you need to reference the named range, type the name you assigned preceded by an equal sign. For example, if you named a range "Quantity_Ordered," you can use it in a formula like this: =...
Sub ClearRange() Application.Goto Reference:="MyRange" Selection.ClearContents End Sub Looping Through Cells in a Named Range The following example loops through each cell in a named range by using aFor Each...Nextloop. If the value of any cell in the range exceeds the value oflimit, the...
A very cool use for a named range is that you can use one cell for your formula values. Suppose you want to mark up a cost to determine your price. Your costs are all in column B. If you copy the formula shown below, each row's formula will change. The reference to F1 will chan...
Here's how you can create a named range in your spreadsheet: On theFormulastab, in theDefined Namesgroup, clickDefine Name. In theNew Namedialog box, in theNamebox, type the name you want to use for your reference. Note:Names can be up to 255 characters in length. To specify the sc...
Reference Feedback Definition Namespace: Microsoft.Office.Tools.Excel Assembly: Microsoft.Office.Tools.Excel.dll Gets the Range referred to by a NamedRange control. C# 复制 public Microsoft.Office.Interop.Excel.Range RefersToRange { get; } Property Value Range A Range referred to by a Name...
Excel Developer ReferenceRanges are easier to identify by name than by A1 notation. To name a selected range, click the name box at the left end of the formula bar, type a name, and then press ENTER.Referring to a Named RangeThe following example refers to the range named "MyRang...
public Microsoft.Office.Interop.Excel.Range DirectPrecedents { get; } Property Value Range ARangethat represents the range containing all the direct precedents of theNamedRangecontrol. Examples The following code example creates aNamedRangeand sets a reference in cell C2 to refer to cell C1, and ...
.NET Framework Security Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code. See Also Reference NamedRange Interface Microsoft.Office.Tools.Excel Namespace中文...
Reference Feedback DefinitionNamespace: Microsoft.Office.Tools.Excel Assembly: Microsoft.Office.Tools.Excel.dll Gets or sets the height of all the rows in the NamedRange control, measured in points. C# Copy public object RowHeight { get; set; } Property Value Object The height of all ...
Represents a string reference of the form "SheetName!A1:B5", or a global or local named range.