Scoping names

A named cell or range normally has a workbook-level scope — in other words, you can use the name in any worksheet in the workbook.

Another option is to create names that have a worksheet-level scope. To create a worksheet-level name, define the name by preceding it with the worksheet name followed by an exclamation point: for example, SheetllSales. If the name is used on the sheet in which it is designed, you can omit the sheet qualifier when you reference the name. The Define Name dialog box lists worksheet-level names only if the sheet on which they are defined is active. You can, however, reference a worksheet-level on a different sheet if you precede the name with the sheet qualifier.

If you decide to use a combination of workbook-level and worksheet-level names, make sure that you understand how this works, or you may be in for some surprises when you figure out that your names don't refer to what you think they refer to.

0 0

Post a comment