Bug 106193 - Erroneus Formula calculation containing INDIRECT(ADDRESS()), ending in error value
Summary: Erroneus Formula calculation containing INDIRECT(ADDRESS()), ending in error ...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.5.1 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-25 22:54 UTC by Jesús Alonso
Modified: 2017-03-01 22:15 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test Address+Indirect (15.82 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-02-26 01:04 UTC, m_a_riosv
Details
Check cell C2 in sheet Hoja2 (6.22 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2017-02-26 02:55 UTC, Jesús Alonso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesús Alonso 2017-02-25 22:54:18 UTC
Description:
I have found that a formula like:

=INDIRECTO(DIRECCION(1;1;;;"Specs"))

produces a #REF! result.

That should be equivalent to:

=INDIRECTO(DIRECCION(1;1;;1;"Specs");1)

which also fails.

However if R1C1 notaition is used, it works fine:

=INDIRECTO(DIRECCION(1;1;;0;"Specs");0)

which produces the right result.

It looks like when the A1 style argument is ommited or set to its default value (non zero) is not applied correctly.


Steps to Reproduce:
See Description.

Actual Results:  
#REF! result

Expected Results:
Actual value of referenced cell


Reproducible: Always

User Profile Reset: No

Additional Info:
After some testing it seems that ADDRESS function is returning the expected value as described in the help. It looks like INDIRECT function does not work correctly when A1 style is especified explicitly or by default.

Spreadsheets using this functions become useless due to #REF! values produced.


User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:51.0) Gecko/20100101 Firefox/51.0
Comment 1 m_a_riosv 2017-02-26 01:04:27 UTC
Created attachment 131470 [details]
Test Address+Indirect

There are two places where to set up formula syntax:
- Menu/Tools/Options/LibreOffice calc/Formula - Formula Option - Formula syntax.
- Menu/Tools/Options/LibreOffice calc/Formula - Detailed Calculation Settings - Custom - Details - Reference syntax for string reference.
With both as 'Calc A1' results look ok.

Attached a sample file that looks ok for me.
Comment 2 Jesús Alonso 2017-02-26 02:41:36 UTC
The file in which I noticed the problem is an Microsoft Excel file with extension XLSX.

I have tried to create a simple example file created from scratch with LibreOffice Calc and it seems to work just fine.

Right now I do not have accessto Microsoft Office to try to create a simple example with it, so I will try to create a simplified version of the file I observed this behaviour with.
Comment 3 Jesús Alonso 2017-02-26 02:55:22 UTC
Created attachment 131471 [details]
Check cell C2 in sheet Hoja2

Please check C2 in sheet Hoja2
Comment 4 m_a_riosv 2017-02-26 03:27:53 UTC
The issue is with the option in:
Menu/Tools/Options/LibreOffice calc/Formula - Detailed Calculation Settings - Custom - Details - Reference syntax for string reference.
It is with your file 'Excel A1', so C2 having 'Calc A1' reference gives an error, change it to 'Calc A1 | Excel A1" and all formulas work fine.
Comment 5 Jesús Alonso 2017-02-26 03:37:44 UTC
thanks a lot!!

it was driving me crazy

I really appreciate your help, I didn't know there were so many options with such an impact on results
Comment 6 m_a_riosv 2017-02-26 13:48:17 UTC
There was a great effort from devs to achieve compatibility ways for INDIRECT().

The better compatibility it's avoiding INDIRECT() whenever it's possible, besides it is a volatile function, used massively can slow down the spreadsheet.