Problems with Calc

Discuss the spreadsheet application
Post Reply
John17
Posts: 2
Joined: Tue Aug 21, 2018 9:44 am

Problems with Calc

Post by John17 »

What is wrong with this statement.
IF(C18+D18+E18+F18+G18=0;0;G18-(C18+D18+E18+F18)+H17)
When I use it I get a blank response even with values in some of the fields.
OpenOffice 4.1.3 on Windows 10
User avatar
Zizi64
Volunteer
Posts: 11362
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Problems with Calc

Post by Zizi64 »

Please upload a real spreadsheet file (in ODF format) here.
And you can try some more parentheses:
= IF(C18+D18+E18+F18+G18=0;0;G18-(C18+D18+E18+F18)+H17)
(maybe the G18=0 part gives a boolean result...)

=IF((C18+D18+E18+F18+G18)=0;0;G18-(C18+D18+E18+F18)+H17)
Last edited by Zizi64 on Sun Sep 16, 2018 2:56 pm, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Problems with Calc

Post by Villeroy »

If C18:G18 includes a text value you would get an error, so I think that C18+D18+E18+F18+G18 is not 0 because of decimal rounding issues.
Accounting in spreadsheets is a good reason to get fired.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
jrkrideau
Volunteer
Posts: 3816
Joined: Sun Dec 30, 2007 10:00 pm
Location: Kingston Ontario Canada

Re: Problems with Calc

Post by jrkrideau »

Villeroy wrote: Accounting in spreadsheets is a good reason to get fired.
I once saw an advertisement for analysts for the Canadian Department of Finance with "experience in large, multi-sheet spreadsheet programs". I wonder if that explains our deficit?
LibreOffice 7.3.7. 2; Ubuntu 22.04
Post Reply