Hello,
In previous versions of LibreOffice calc (up to and including 3.5.x) it was easy to have semi-blank field as a result of a function (for example “if”):
=if(a1=0;1;"")
then if a1 wasn’t 0 we had empty cell – was working ok, no problems.
But starting with 3.6.x (including recently released 4.0.0) it is somehow broken - returning “” causes to misbehave counting functions as well as pivot tables (which then fallbacks to text summary even if the source cell formating is number or even time – highly annoying.
tl;dr
how to return null/empty/non-value form function? I’ve tried:
=if(a1=0;1;)
=if(a1=0;1;null)
=if(a1=0;1;NULL)
and nothing seems to works
EDIT:
Don’t know why I cannot comment or particular answer so here it is: ma original problem comes from this bug report https://bugs.freedesktop.org/show_bug.cgi?id=54651 as indicated there default returned value messes up PivotTable.
- @mariosv - unfortunatelly your solution doesn’t work as i get “0” instead of empty cell (so it’s same as =if(true;1;0), but it causes PivotTable to show correct values
- @Edward3 - in your case ignoring optional argument causes the cell to display “0” (it’s time formatted) thus not what I want (i want to have empty cell)
- @ROSt53 - please set format of the cell to time and it will display “00:00” instead of empty cell…