NamedTableRegion
File Object Type |
A Named Table Region defines a group of cells in a table or spreadsheet.
You can use regions to name groups of numbers for calculations, or you can use the named region as a lookup function for the information inside.
Define a named region:
- Select the range of cells you wish to use.
- In the toolbar, select Table>Define Region.
The region is now created with a default name, e.g. Region2.
Name a region:
- After following the steps above, select the region by clicking on the label.
- Open the properties window.
- Edit the Name property.
Use a named region in place of a range of cells:
- Select the region and open the properties window.
- Click the Headers property neat the top.
- Change Count from 1 to 0.
- Use the named region in a formula as you would a named array or range of cells.
Note that you can achieve a similar effect by naming a range of cells in a formula, e.g. numbers = B3:C7
Use a named region as a lookup function:
For cells with headers in the top line and the lookup values in the first column:
- Create the region using the steps above.
- In a formula, use the region name like a function.
- The first input is the lookup value, and it should match a cell in the first column.
- The second input is the lookup column, and it should match one of the headers.
- Note that for text values, quotation marks are needed to specify the input as text.
Note that a similar thing can be accomplished by defining a custom function using Vlookup and Match.
For a region with headers and lookup values in different locations in the range (e.g. headers on the left or lookup values in the second column):
- Create the region.
- Select the region and open the properties window.
- Select the Headers property and edit the Side to match the header location.
- Edit the Lookup Fields property to match which row/column the lookup values should be in.
- Use the region as a function where the first input is the lookup value, and the second input is the header name.
See also:
You can refer to this file object type in any formula, macro, module, or other script in Blockpad. You can use either its name or its full path:
-
To refer to it by name, use
NamedTableRegion
(make sure the library Library.Docs.Objects is included with Include Libaries) - To refer to it by its full path, use
Library.Docs.Objects.NamedTableRegion
See also: