Vector Functions

In some cases it is desirable to use HydroTools functions as Excel “Array Formulas” so that their output consists of two cells rather than a single cell.   For example, for the LeftBank () function, it is sometimes convenient to output not just the horizontal coordinate of the bank, but also the vertical coordinate as well.

In fact, this is exactly what the functions LeftBank() and RightBank() always do.  These functions are array functions which return the horizontal coordinate of the bank in the first cell and the vertical coordinate in the second cell.  If only one cell is selected for the output, only the first output, the horizontal coordinate, is given as output.


The functions LeftBank() and RightBank() are both array formulas.  

For users unfamiliar with array formulas, they require getting used to.  Here are the basics:

  1. To input the function, highlight two adjoining cells.
  2. Type the formula desired.
  3. Hit “Ctrl-Shift-Enter”.
  4. The formula you typed in will now be listed in both cells with curly brackets around it.  The two output values will be displayed in the two cells.
  5. Once you have an array function, you cannot delete only one cell’s value – you must delete both at once by highlighting both. 
  6. To update the formula, you must use “Ctrl-Shift-Enter” to complete the change.  Hitting only “Enter” will give an error.
  7. When editing (and sometimes inputting) array functions, it is sometimes necessary to make sure the cursor is located in the formula bar on the top of the Excel window, not in the cell itself, which is where it is when you select a cell and start typing.  If you are having difficulty getting Excel to accept a correction to an array formula, make sure that the cursor is in the formula bar, not the cell.
  8. You can get Microsoft help by searching “array formula”.

© DimensionEngine 2015.   For questions or bug reports, email us.