MM_RESULT function

Returns the value of a multidimensional cell for specified loop dimensions. Sums dimensions for unspecified loops.

Written By Nikolas Ethoré (Super Administrator)

Updated at November 24th, 2021

Description

Returns the value of a multidimensional cell for specified loop dimensions. Sums dimensions for unspecified loops.

Syntax

=MM_RESULT(Cell, ["Name", Index], ["Name2", Index2], ...) 
  • Cell
    Cell that contains the results you want to access. 

  • "Name", Index (optional)
    String, Integer.
    Name and dimension index of the first loop whose results you want to access. If you want to access a specific number of simulations, use Name = "SIM".

  • "Name2", Index2 (optional)
    String, Integer.
    Name and dimension index of the second loop whose results you want to access. If you want to access a specific number of simulations, use Name = "SIM".

  • ...
    Other loop specifications. 

 Warning: The parameters Name, Name2, ... are case sensitive.

Remarks

  • If you do not mention one or several loops in the parameters, the function will return the sum of all results for this/these loop(s). 

  • You cannot specify the same loop with different dimensions. If you want to sum two different dimensions of the same loop, use twice the MM_RESULT function for each dimension you want to sum. 

Example 1: One loop, specified dimension

  • Formula 1: =MM_LOOP("Loop",A2:A6) in B2
    Loops on all cells of range A2:A6. See MM_LOOP function for further details. 

  • Formula 2: =MM_RESULT(B2,"Loop",3) in B5
    Returns 3000. The formula returns the value of cell B2 corresponding to the specified dimension, which is 3. 

Example 2: One loop, no specified dimension 

  • Formula 2bis: =MM_RESULT(B2)
    In this formula, the loop is omitted. Thus, it is summing all values for the loop, returning 10000.

Exemple 3: Multiple loops

  • Formula 3: =MM_LOOP("Loop1",A3:A6)+MM_LOOP("Loop2",B3:B6) in cell C2
    Note that this cell depends on two loops, Loop1 and Loop2. Its number of dimensions is equal to 4*4 = 16. 

  • Formula 4: =MM_RESULT(C2,"Loop1",MM_DIMINDEX("Loop1")) in cell C5
    This formula does not specify Loop2, so it is summing results of Loop2. Consequently, the number of dimensions of cell C5 is 4 corresponding to the size of Loop1.
    The third argument of the function depends on the selected dimension on Mind: if you select the first dimension for the #Result table, MM_DIMINDEX will return 1. Thus, the formula returns 3000 for dimension 1, 7000 for dimension 2, 11000 for dimension 3 and 15000 for dimension 4.