Bug 154101 - Feature Request =A1 shows a 0 when A1 is blank
Summary: Feature Request =A1 shows a 0 when A1 is blank
Status: CLOSED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-09 19:52 UTC by Steve Dulaney
Modified: 2023-03-09 21:24 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
custom function a, But still =A1 should be blank if Cell A1 is blank (8.80 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-03-09 20:01 UTC, Steve Dulaney
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Dulaney 2023-03-09 19:52:10 UTC
Description:
 You All do a great job,
I notice if i have a function =A1 and A1 is blank, that function shows 0. That messes up averages and counts downstream. Excel is the same way. It also messes up reporting. If I do a test on lead in water, a function pulls it over to the report(printout) area. If I did not run the test is will still show a zero, as if the test was run and the water is safe. Why can't the function be blank w/o if(isblank(a1)"",a1). Then LibreOffice Calc would be infinitely better than Excel, Which is already better. In the file below shows a custom a function with that. Look in B1
  If only =A1 would be blank if Cell A1 is blank
  Best yet, switch it so it works for one file.
                     Thanks for everything
        I don't expect you to do this because rich Microsoft has not done it , just an idea.


Steps to Reproduce:
1.=a1 should be blank if a1 is blank
2.
3.

Actual Results:
if Cell a1 is blank, the function shows 0

Expected Results:
Ideally =a1 should show blank if a1 is blank. 


Reproducible: Always


User Profile Reset: No

Additional Info:
I really do not expect you to do this, Excel doesn't do it, and you have no money.
Comment 1 Steve Dulaney 2023-03-09 20:01:48 UTC
Created attachment 185871 [details]
custom function a, But still =A1 should be blank if Cell A1 is blank

Shows 2 examples in B1 and B2 functions. I think =A1 should be blank if cell A1 is blank. A custom function is in B1.
Comment 2 Eike Rathke 2023-03-09 21:24:29 UTC
Result 0 for a reference to an empty cell is standard behaviour in all major spreadsheet implementations, for interoperability we will not deviate from that.

As you already noted, =IF(ISBLANK(A1);"";A1) suppresses that, and also excludes the cell from operations that expect a number sequence like AVERAGE().
You could also use =IF(ISBLANK(A1);NA();A1) that displays #N/A and use =AGGREGATE(1;6;cellrange) for an average that excludes error values.
See https://help.libreoffice.org/7.5/en-GB/text/scalc/01/func_aggregate.html?DbPAR=CALC