MM_LASTROW function

Returns the index of the last row of a grid from one of its cells. Used for dynamic tables.

Written By Nikolas Ethoré (Super Administrator)

Updated at November 24th, 2021

Description

Returns the index of the last row of a grid from one of its cells. In Excel, it returns the index of the row of the first empty cell minus 1, starting from the specified cell. Used for dynamic tables.

Syntax

=MM_LASTROW(Cell)
  • Cell
    Any cell inside the grid from which you want to get the index of the last row.

Remarks

  • Warning: This formula has a different behavior in Excel and in Mind. See the first example.

  • This function is useful when you have dynamic tables, i.e. when the size of your table varies, for instance, if you use the input manager, interlinks, or dynamic instances. 

  • See MM_LASTCOLUMN to return the index of the last column. 

Example 1

Formula:=MM_LASTROW(C3) returns 7 in Mind. Indeed the last row of the grid is row 7. In Excel, the function returns 5 because the first empty cell of the table is in row 6 (the initial cell does not count). Thus, it returns the index of row 5.

Example 2

If your table begins at row 123, the function returns the index of row 127 (in Mind).