MM_SORTDIM

Sorts the numerical values of the dimension of target

Written By Nikolas Ethoré (Super Administrator)

Updated at November 19th, 2021

Description

MM_SORTDIM enables us to sort the numerical values of the dimension of the target cell.

This function is similar to MM_SORT function (deprecated).

Syntax

=MM_SORTDIM(Obj,SortingOrderObj,[Name1,Index1],[Name2,Index2],..)
  • Obj: The cell on which you want to perform the sorting of dimension values.

  • SortingOrderObj: Sorting order. True= ascening, False=descending

  • Name1: Dimension name

  • Index1: Dimension index

Remarks

  • This function is similar to function MM_SORT, as it can also sort ranges. New functions MM_SORTDIM and MM_SORTRANGE are just different versions from the use of MM_SORT.

  • MM_SORTDIM is not meant to be used with a range of sizes bigger than a cell.

  • See MM_RANK function to return the rank of the sorted values of the dimensions of the input cell.

Basic example

Let us consider the following inputs, with each loop that includes an input range.

If you want to sort values from "Inputs1" in ascending order, you can write the following formula:

=MM_SORTDIM(F2,TRUE)

This formula will return a multidimensional cell with your input values from "Inputs1" sorted in ascending order.

Example with several loops

In this example, you want to sort values from the sum of your 2 loops according to a chosen index from your first loop named "Inputs1".

Your formula will return here a cell with dimensions from 2 loops. If you choose a specific index for your first loop in your formula, the resulting cell will include only dimensions from the second loop (similarity with MM_RESULT function‍).

You can see here the sorting list for the sum of 2 loops according to the first index of loop "Inputs1":