title: Why this array formula doesn't work?
body: <p><img src="https://i.stack.imgur.com/AgroF.png" alt="enter image description here"></p>
  
  <p><em>On the illustration all formulas are array. The range that each formula spans is bordered, and the first formula on each block is written on the top of that block.</em> </p>
  
  <p>Range <code>A4:A103</code> is an input vector (which is numeric), range <code>C4:G23</code> is a given (input) permutation of the rows of <code>A4:A103</code> (necessarily positive non-zero integer numbers not greater then the length of the input vector).</p>
  
  <p>Let us I interpret the permutation matrix as set of rows.</p>
  
  <p><strong>How to compute for each row <em>in a constant number of cells</em> the minimal number in the input vector?</strong> By the constant number of cells, I mean solution, that would require fixed number of cells for each row, regardless of the number of columns in permutation. (In the production case each dimension is much, much bigger; there is about 100 columns in the permutation matrix.)</p>
  
  <p>I don't ask for VBA solutions. If it is necessary the solution can use a free and publicly available Excel add-on, like MoreFunc, but I'd prefer to keep it vanilla Excel 2007 or later. </p>
  
  <hr>
  
  <p>I thought that the formula <code>{=MIN(INDEX(INDIRECT($A$2);$C4:$G4))}</code> would solve my problem. Surprisingly, Excel seems to not take into account the array nature of the formula, and evaluates it as if it was written as <code>=MIN(INDEX(INDIRECT($A$2);$C4)</code> which is equivalent to dysfunctional <code>=INDEX(INDIRECT($A$2);$C4)</code>. </p>
  
  <p>On the other hand, we can see the argument to the <code>MIN</code> is understood as array in the range I4:M4. </p>