Bug 142239 - Formula: =ISNUMBER(ADDRESS(ROW(),6,4)) is not returning the correct value
Summary: Formula: =ISNUMBER(ADDRESS(ROW(),6,4)) is not returning the correct value
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.1.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-12 14:18 UTC by Warren L. Berardi
Modified: 2021-05-12 16:07 UTC (History)
0 users

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 Warren L. Berardi 2021-05-12 14:18:31 UTC
Description:
The formula:  =ISNUMBER(ADDRESS(ROW(),6,4)) is returning a value of FALSE when it should be evaluating to a value of TRUE.

Steps to Reproduce:
1.Put 1234 in cell F11
2.Put the formula:  =ADDRESS(ROW(),6,4) in cell R11 
3.Put the formula:  =ISNUMBER(F11) in cell S12
4.Put the formula:  =ISNUMBER(ADDRESS(ROW(),6,4)) in cell S11

Actual Results:
Cell R11 has a value of:  F11, which is correct.
Cell S12 has a value of:  TRUE, which is correct.
But cell S11 has a value of:  FALSE, which is wrong.  It should have a value of TRUE.

Expected Results:
Cell S11 should have a value of TRUE, not FALSE.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.1.2.2 (x64) / LibreOffice Community
Build ID: 8a45595d069ef5570103caea1b71cc9d82b2aae4
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

I need the formula:  =ISNUMBER(ADDRESS(ROW(),6,4)) to work correctly.  It is vital to conditional formatting that I am doing.
Comment 1 Warren L. Berardi 2021-05-12 14:30:04 UTC
If you are wondering why the value in the field "Version:" is 7.1.1.2 release in stead of 7.1.2.2 which is my true release, is because the bug submission website would not accept my selection of 7.1.2.2 as a valid release, gave me an error message, and made me select 7.1.1.2 that it did accept.
Comment 2 [REDACTED] 2021-05-12 15:23:32 UTC
1) Result of "ADDRESS(ROW();6;4)" is a text - Help page https://help.libreoffice.org/latest/en-US/text/scalc/01/04060109.html?DbPAR=CALC#bm_id3146968  states: "Returns a cell address (reference) as text"

2) Function ISNUMBER (Step.4) requires a value - https://help.libreoffice.org/latest/en-US/text/scalc/01/04060104.html?DbPAR=CALC#bm_id3148688

3) If you test text "F11" using "ISNUMBER()" the this correctly is FALSE. Text "F11" is not a number but text.

4) If you want text "F11" to reference the context of cell "F11" you need to turn text F11 into a reference using function INDIRECT - Help page https://help.libreoffice.org/latest/en-US/text/scalc/01/04060109.html?DbPAR=CALC#bm_id3153181 states: "Returns the reference specified by a text string."

5) Finally to achieve you goal, your formula need to read:

=ISNUMBER(INDIRECT(ADDRESS(ROW();6;4))) (which yields TRUE)

Not a bug.
Comment 3 Warren L. Berardi 2021-05-12 16:07:02 UTC
Thank you very much.  I did look up INDIRECT in HELP before I submitted this bug, but I really did not understand that this is what it did.  Thank you very much for explaining it for me.