<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - LibreOffice 5.4 Calc wrong reference when selecting a function area from another sheet"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=116922">116922</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LibreOffice 5.4 Calc wrong reference when selecting a function area from another sheet
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>5.4.5.1 release
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Calc
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>trblft@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
Hi, We're using LibreOffice 5.4 Calc.
We create 2 sheets.
On sheet2, when choosing "insert > function" menu, let's say average function
for Example, we try to apply this to Area A1:A2 on Sheet1 with mouse selection.
The formula should become =AVERAGE(Sheet1.A1:A2)
Instead of this, we get =AVERAGE($#REF.A1:Sheet1.A2)
If we do the same with Sheet5 instead of Sheet1, we get
=AVERAGE(Sheet3.A1:Sheet5.A2)
How is is possible?
This is version Version: 5.4.5.1 (x64)
Build ID: 79c9829dd5d8054ec39a82dc51cd9eff340dbee8
This bug doesn't exist on Version: 5.2.6.2 (x64)
Build ID: a3100ed2409ebf1c212f5048fbe377c281438fdc and 6.0, can you fix this
please?
Thanks for your help, have a nice day.

Steps to Reproduce:
See description

Actual Results:  
See description

Expected Results:
See description


Reproducible: Sometimes


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101
Firefox/60.0</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>