[Solved] Formula to return a blank/empty cell

Discuss the spreadsheet application
Post Reply
Bozos_Boy
Posts: 4
Joined: Tue Mar 20, 2018 9:43 pm

[Solved] Formula to return a blank/empty cell

Post by Bozos_Boy »

Hi, I am working on a dart calculator and would like unused cells with formulas to be blank or empty until inputted into.

I was expecting this formula =IF(H10>=0;(H9+H10)/2;(""))
to return a blank cell if nothing to calculate but it doesn’t. I am not sure why. Anyone know? Tks P

Working on a 2020 Mac Mini M1 running Ventura 13.1 with Apache OpenOffice 4.1.11
Last edited by Bozos_Boy on Sat Nov 25, 2023 1:17 am, edited 1 time in total.
openoffice 4.1.2 on macOS 10.13.3
Mountaineer
Posts: 318
Joined: Sun Sep 06, 2020 8:27 am

Re: formula to return a blank/empty cell

Post by Mountaineer »

Bozos_Boy wrote: Fri Nov 24, 2023 11:26 pm ... return a blank cell ...
A formula will return a value, not "a cell".
In your case the formula will either calculate the average of two cells or an "empty string". The latter may be invisible, but the cell contains a formula and shows an invisible value, so the cell is not blank.

If you return "" you should also test this like IF( H10<>"" ; ...
OpenOffice 3.1 on Windows Vista
User avatar
Lupp
Volunteer
Posts: 3553
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: formula to return a blank/empty cell

Post by Lupp »

The parentheses around "" (the empty string) in the formula are superfluous, but should not cause an error.

Always report what actually happens. Then tell what you expected to happen.
Best also attach a simplified example showing your issue.
Bozos_Boy wrote: ... if nothing to calculate ...
Are you talking here of the case H10<0 ?
The formula should return now the empty text (string of length 0). What does actually happen?

Concerning the terms: "Blank" cells are cells that neither contain a number (what format ever) nor a text nor a formula. Therefore a formula can never result in a blank cell.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
Bozos_Boy
Posts: 4
Joined: Tue Mar 20, 2018 9:43 pm

Re: formula to return a blank/empty cell

Post by Bozos_Boy »

Mountaineer wrote: Fri Nov 24, 2023 11:51 pm
Bozos_Boy wrote: Fri Nov 24, 2023 11:26 pm ... return a blank cell ...
If you return "" you should also test this like IF( H10<>"" ; ...
This seemed to do what I want it to do. tks
openoffice 4.1.2 on macOS 10.13.3
Post Reply