MM_CURRENTITERATION function

Returns the index of the iteration that is selected or that is being calculated.

Written By Son Nguyen (Administrator)

Updated at September 12th, 2023

Description

Returns the index of the iteration that is selected or if not visible, the iteration that is calculated.

To learn more about iterations, check the general article on iterations.

Syntax

=MM_CURRENTITERATION()

No parameters.

Remarks

  • If the results of a grid with iterations are saved for display on the interface, the function returns the index of the iteration that was selected.
  • If the results of a grid with iterations are not saved for display on the interface, the function returns the last available index. However, in the calculations, the function returns the correct index for a given iteration, meaning when the first iteration is calculated, the function returns 1; if it is the second, it returns 2 and so on.
  • The function can only be used on a workbook on which iterations are defined.

Example

If a workbook has 3 iterations, the function MM_CURRENTITERATION will return 1 on the first iteration, 2 on the second and 3 on the third.