Bug 118187 - The text of an example of using the INDIRECT calc function is found in the wrong place, under ADDRESS.
Summary: The text of an example of using the INDIRECT calc function is found in the wr...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0 target:6.1.0.1
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-15 23:36 UTC by Howard Johnson
Modified: 2018-08-01 16:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Howard Johnson 2018-06-15 23:36:16 UTC
Description:
Hi, 

Near the very bottom of https://help.libreoffice.org/Calc/Spreadsheet_Functions

And in this example:
=============================================================
Example:

=ADDRESS(1;1;2;;"Sheet2") returns the following: Sheet2.A$1

If the cell A1 in sheet 2 contains the value -6, you can refer indirectly to the referenced cell using a function in B2 by entering =ABS(INDIRECT(B2)). The result is the absolute value of the cell reference specified in B2, which in this case is 6.
=============================================================

The last paragraph (starting with, "If the cell A1 in sheet 2..") does not relate to the ADDRESS function, but rather to the INDIRECT function.  So this paragraph needs to get moved up to the correct place after the INDIRECT function.

I would fix this myself but I can't seem to figure out how to login to fix it.

Steps to Reproduce:
Open https://help.libreoffice.org/Calc/Spreadsheet_Functions and see Description above.

Actual Results:
Open https://help.libreoffice.org/Calc/Spreadsheet_Functions and see Description above.

Expected Results:
Open https://help.libreoffice.org/Calc/Spreadsheet_Functions and see Description above.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Jean-Baptiste Faure 2018-06-16 18:22:25 UTC
I think that it is not a bug because that explains how the return of ADDRESS function can be used using INDIRECT function to get the content of a cell: first step you get the cell address, second step you get the content of a cell knowing its address.

Does that helps?

Status set to NEEDINFO, please set it back to UNCONFIRMED once requested
informations are provided.

Best regards. JBF
Comment 2 Howard Johnson 2018-06-17 03:26:08 UTC
:-) 

But this doesn't even refer to ADDRESS at all:

  "If the cell A1 in sheet 2 contains the value -6, you can refer indirectly to the referenced cell using a function in B2 by entering =ABS(INDIRECT(B2)). The result is the absolute value of the cell reference specified in B2, which in this case is 6."



On my own I finally figured out how to use ADDRESS and INDIRECT together, but this example was of no help to me.



How about using this as an example:

    =INDIRECT(ADDRESS(1;1;2;;"Sheet2"))


Thanks.
Comment 3 Commit Notification 2018-06-17 12:35:52 UTC
Olivier Hallot committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=184324625ea1e803007b9c41ce625ae6014573f1

tdf#118187 Text for INDIRECT() in wrong place
Comment 4 Commit Notification 2018-06-17 12:37:24 UTC
Olivier Hallot committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=440983e0b533a2f447dbcc49521812dd5fa03ec7&h=libreoffice-6-1

tdf#118187 Text for INDIRECT() in wrong place
Comment 5 Adolfo Jayme Barrientos 2018-06-18 07:53:48 UTC
The change will be reflected soon in https://help.libreoffice.org/6.1/en-US/text/scalc/01/04060109.html (the old wiki pages are no longer updated)
Comment 6 Mike Kaganski 2018-07-24 00:07:42 UTC
This was not a proper fix here :-(

This all was in proper place; the only thing missing was some detail that the first formula for ADDRESS was meant to be in cell B2, like this:

=============================================================
Example:

=ADDRESS(1;1;2;;"Sheet2") returns the following: Sheet2.A$1

If **the formula above is in cell B2 of current sheet, and** the cell A1 in sheet 2 contains the value -6, you can refer indirectly to the referenced cell using a function in B2 by entering =ABS(INDIRECT(B2)). The result is the absolute value of the cell reference specified in B2, which in this case is 6.
=============================================================

Current fix tore the combined example apart, making the second part (now placed in INDIRECT) disconnected from the context. There's nothing there now that could describe why "=ABS(INDIRECT(B2))" should suddenly return 6 (how could someone figure that it's "=ADDRESS(1;1;2;;"Sheet2")" that connects B1 to Sheet1.A1?).
Comment 7 Howard Johnson 2018-07-24 01:40:53 UTC
Very good Mike!

=============================================================
Example:

=ADDRESS(1;1;2;;"Sheet2") returns the following: Sheet2.A$1

If **the formula above is in cell B2 of current sheet, and** the cell A1 in sheet 2 contains the value -6, you can refer indirectly to the referenced cell using a function in B2 by entering =ABS(INDIRECT(B2)). The result is the absolute value of the cell reference specified in B2, which in this case is 6.
=============================================================



....Only thing I think I might add is:

1) Make "Example:" plural (Examples:), (as there are really two examples, where the 2nd depends on the 1st),

2) prefix the 2nd example with "Furthermore, ..." (to help show the start of the 2nd example),

3) possibly add this note which I think I would find helpful, "(i.e. the one holding -6)", and

4) add this additional clarification below it:
     "i.e. B2 ==> Sheet2.A$1 ==> -6    -- where 'a ==> b' means a contains b"

like this:


=============================================================
Example**s**:

=ADDRESS(1;1;2;;"Sheet2") returns the following: Sheet2.A$1

**Furthermore, if the formula above is in cell B2 of current sheet, and if** the cell A1 in sheet 2 contains the value -6, you can refer indirectly to the referenced cell **(i.e. the one holding -6)** using a function in B2 by entering =ABS(INDIRECT(B2)). The result is the absolute value of the cell reference specified in B2, which in this case is 6.

**i.e. B2 ==> Sheet2.A$1 ==> -6    -- where 'a ==> b' means a contains b**
=============================================================
Comment 8 Commit Notification 2018-08-01 16:18:55 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=3dd9b7fb5e45ee88299457e397683baec80abb9e

Revert "tdf#118187 Text for INDIRECT() in wrong place"