MM_AOCVALUE function

Returns normal or stretched value of input AOC cell.

Written By Nikolas Ethoré (Super Administrator)

Updated at November 24th, 2021

Description

Returns normal value of input AOC cell in case of TRUE as second parameter, or stretched values in case of FALSE as second parameter. In Excel, it returns the default value of the cell.

Syntax

=MM_AOCVALUE(Cell, ValueType)
  • Cell

    Cell from a /AOC table whose value you want to output.

  • ValueType 

    Boolean to specify which type of value to return:

    - TRUE for normal value,

    - FALSE for stretched value.

Remarks

  • This function returns correct values only if the input cell is in a grid with the flag /AOC. It returns NaN if the input cell is for example an AOC depending grid. Use MM_RESULT for AOC depending grids.

  • If you put as input cell a cell that only exist in the AOC table for stretched values, the function will return empty value when ValueType = TRUE and the stretched value ValueType = FALSE.

Example 1: Basic example

In the example below, the MM_AOCVALUE function take as its first parameter the first cell of the table Table2. Its normal value is equal to 1 and its stretched value is equal to 2.

The function returns 1 when ValueType equals TRUE:

The function returns 2 when ValueType equals FALSE:

Example 2: Example with cell to be resized

With the previous example, we can see that Table2 is resized when we switch the grid from normal to stretched values. In fact, the grid contains 2 rows with normal values and 3 rows with stretched values.

Below is an example of MM_AOCVALUE with an input cell that is not included in normal but in stretched values in grid Table2. It takes as input cell the cell in the first column and third row of table Table2.

The function returns empty value when ValueType equals TRUE:

The function returns 8 when ValueType equals FALSE: