The following formula returns the correct result:


This one returns the same result:


But this one returns the wrong result:


What is wrong with my ArrayFormula?


This question is not duplicated of this because I am asking about ArrayFormula, not about Clamp (why was it marked as duplicated??)

  • 1
    The problem is that min and max, when given an array, just take the minimum (or maximum) of that array. They cannot be combined with arrayformula in order to "clamp" each value of an array within a range. – user79865 Aug 16 '15 at 20:51
  • @NormalHuman Thanks. If you post an answer I will accept it. – stenci Aug 17 '15 at 0:43