We recently added support for 'Named Expressions' in
. Named Expressions are similar to Named Ranges except that instead of referring to a static cell, they refer to a formula. It can be useful in the following ways:
It can simplify your formulas. If you have an oft-repeated expression or a nested formula as part of formulas in many of your cells, then you can give a name to the expression or formula and then use that named expression as part of your formulas. This simplifies your formulas and improves readability.
You can create dynamic named ranges - ranges that grow automatically as you add data at the end. You can use the
() function for this purpose and give it a name.
Have a look at the spreadsheet below which contains a named expression defined using the function OFFSET($B$3;0;0;COUNT($B3:$B100);1). The named range 'downloads' automatically expands itself to include the last row of data (without any break in between) in the Downloads column. You can follow the instructions on the spreadsheet below and see it in action. Use the 'Click to Edit' button to make the spreadsheet interactive.
Defining a named expression is similar to defining a named range. Navigate to the 'More' menu available on the toolbar and select either 'Name this Cell/Range' (shortcut Ctrl+F3) or 'View Defined Names'. A dialog will be shown, where you can define a new name and refer it to a cell or a range or a formula/expression. You can also give cell references relative to the selected cell in the expression/formula that you provide. Here is a screenshot.
In future, we can also support providing a named range for the data range in your charts. Lets say, you define a named expression using the OFFSET function as explained above and give that as the data source to your chart. Now as you keep adding new rows of data to your spreadsheet, your chart will automatically expand itself to include these data. This could be possible in future.