MM_LASTROWCELL function

Returns the cell in the same column as the specified cell and in the last row of the corresponding table. Used for dynamic tables.

Written By Nikolas Ethoré (Super Administrator)

Updated at November 24th, 2021

Description

Returns the cell in the same column as the specified cell and in the last row of the corresponding table. Used for dynamic tables.

Syntax

=MM_LASTROWCELL(Cell)
  • Cell
    Cell that defines the table and the column for the output.

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_LASTCOLUMNCELL to return the cell in the same row as the specified cell and in the last column of the corresponding table.

Example 1: Direct call to the cell

Formula1: =MM_LASTROWCELL(C3) returns 19 in Mind. Indeed, the function refers to the cell for the last row and the third column of the grid.
In Excel, the function returns 23 because the first empty cell of the third column is in row 6. Thus, it returns the value before, which corresponds to cell C5. 

Exemple 2: As a cell reference

You can use the MM_LASTROWCELL function as a reference inside a function.

Formula2: =SUM(B6:MM_LASTROWCELL(D3)) returns 208. Indeed, MM_LASTROWCELL(D3) refers to cell D7. Thus, the formula is summing the last two rows of the table.