<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:erack@redhat.com" title="Eike Rathke <erack@redhat.com>"> <span class="fn">Eike Rathke</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - FREQUENCY may have to force array mode on its arguments"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=122301">bug 122301</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Summary</td>
           <td>Function error in Calc
           </td>
           <td>FREQUENCY may have to force array mode on its arguments
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Version</td>
           <td>4.1 all versions
           </td>
           <td>Inherited From OOo
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - FREQUENCY may have to force array mode on its arguments"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=122301#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - FREQUENCY may have to force array mode on its arguments"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=122301">bug 122301</a>
              from <span class="vcard"><a class="email" href="mailto:erack@redhat.com" title="Eike Rathke <erack@redhat.com>"> <span class="fn">Eike Rathke</span></a>
</span></b>
        <pre>Odd. The Microsoft documentation for FREQUENCY() says "Because FREQUENCY
returns an array, it must be entered as an array formula."
<a href="https://support.office.com/en-US/article/FREQUENCY-function-44E3BE2B-ECA0-42CD-A3F7-FD9EA898FDB9">https://support.office.com/en-US/article/FREQUENCY-function-44E3BE2B-ECA0-42CD-A3F7-FD9EA898FDB9</a>

Which on the other hand is misleading, because if just a data range and a bins
range is given and not in array mode the function returns an array
nevertheless, but they probably mean that the function is to be entered as
array formula across a selected cell range to display the array and not just
the first value.

What's problematic here is the $L$11:$L$1000>=0 subexpression, which in this
context with a range works only in array mode and otherwise doesn't result in
an implicit intersection when given on row 7, hence the #VALUE! error; also
ROW() not in array mode returns only the first row of a range, not an array.

ECMA-376-1:2016 OOXML 18.17.7.127 FREQUENCY
says "A call to FREQUENCY shall be an array formula."
but on the other hand doesn't say anything like that about 18.17.7.309
SUMPRODUCT which definitely forces array mode on its arguments, or any other
function known to force array mode.

We may have to submit an update to ODFF as well that doesn't state the
ForceArray attribute
<a href="https://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#FREQUENCY">https://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#FREQUENCY</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>