Specify The Name Of A Range

You can use the Name property to assign a specific name to a range of cells. Excel uses names to reference specific ranges of cells on a worksheet. By specifying a named range you no longer have to know the location of the cells that contain the desired values;you simply need to find the cells with the appropriate range name. For example, if cell B3 contains the sales tax rate, instead of remembering the appropriate cell reference, you can simply assign the name "Tax_Rate" to the cell. This allows you to reference the cell by name when you want to use it.

Column C in the active worksheet. After you assign the name to the range, you can view it in Excel by highlighting the corresponding range, in this case Column C, to see the name appear in the Name box on the Formula Bar.

You can determine the name of a specific range by assigning it to a string variable. For example, the code

RangeName = Columns(3).Name assigns the name of Column C to the RangeName variable.

You can use the Name property to either assign a name to a range of cells or to determine what the name is for the range. To assign a name to a range you need to specify the appropriate name. For example, the code Columns(3). Name = "May_Sales" assigns the name May_Sales to

After you assign a range name to a specific range, you can use the range name to access the range of cells at any point. The advantage of using a range name is that you do not need to set the range within your current procedure. When you assign a range name to a worksheet, it remains there until you remove it.

SPECIFY THE NAME OF A RANGE

SPECIFY THE NAME OF A RANGE

'-H Create a new subroutine.

ype Columns(3).Name = "Salary", replacing Columns(3)

with the range to name and "Salary" with the name for the range.

0 0

Post a comment