[Solved] SUMIF() formula stopped working

Discuss the spreadsheet application
Post Reply
CalcOfficer
Posts: 8
Joined: Thu Jun 07, 2018 3:22 pm

[Solved] SUMIF() formula stopped working

Post by CalcOfficer »

Hi,

I have used the following formula before but it stopped working probably after some open office update.
I use Open Office Version 4.1.2 on Windows 10.

Code: Select all

=SUMIF(Tilikausi2018.$B$3:$B$524;">=1.1.2018";Tilikausi2018.$C$3:$C$524)-SUMIF(Tilikausi2018.$B$3:$B$524;">=1.2.2018";Tilikausi2018.$C$3:$C$524)
The calculation does not do the minus (-) part of the formula and results 0.

If I remove the

Code: Select all

-SUMIF(Tilikausi2018.$B$3:$B$524;">=1.2.2018";Tilikausi2018.$C$3:$C$524)
it calculates

/CalcOfficer
Last edited by CalcOfficer on Thu Jun 07, 2018 6:04 pm, edited 2 times in total.
Windows 10, Apache Open Office 4.1.2
User avatar
Zizi64
Volunteer
Posts: 11360
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: This formula stopped working

Post by Zizi64 »

Please upload your ODF type sample file here.
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.
CalcOfficer
Posts: 8
Joined: Thu Jun 07, 2018 3:22 pm

Re: This formula stopped working

Post by CalcOfficer »

I think I found a reason. The formula is somehow locked and if do a dummy change there it starts to calculate correctly.
I have automatic calculation on and recalculation doesn't help.
Windows 10, Apache Open Office 4.1.2
CalcOfficer
Posts: 8
Joined: Thu Jun 07, 2018 3:22 pm

Re: This formula stopped working [SOLVED]

Post by CalcOfficer »

I solved the problem by replacing one character in each formula
by using FIND/REPLACE "replace all". This was a workaround and the root cause is still unclear
why those formulas were locked.
Windows 10, Apache Open Office 4.1.2
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: [Solved]This formula stopped working

Post by RusselB »

As Tibor asked, please upload a sample file that has the problem showing.
It's impossible to diagnose what is happening with those formulas without seeing the actual spreadsheet.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
CalcOfficer
Posts: 8
Joined: Thu Jun 07, 2018 3:22 pm

Re: [Solved]This formula stopped working

Post by CalcOfficer »

I'm sorry I can not do that for the following reasons:
- the file structure is pretty complicated with plenty of sheets and the formulas are pointing to different sheets
- there is also sensitive information I don't want to share
- the problem does not exist any more, so how to troubleshoot?

The main reason for the issue was that the formulas had become somehow passive (locked) and they
"woke up" after you made a dummy edit operation there. It was not depending on the calculation since the calculation option was all the time on.
Furthermore recalculation did not help either.

I remember one case some time ago when the macros of this file stopped working and I had to reactivate them.
The issue with formulas might be related to that case?

Thank you for your replies
Windows 10, Apache Open Office 4.1.2
User avatar
Zizi64
Volunteer
Posts: 11360
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: [Solved]This formula stopped working

Post by Zizi64 »

I remember one case some time ago when the macros of this file stopped working and I had to reactivate them.
The issue with formulas might be related to that case?
How we can guess it without a sample file (without the full macro code, without the working formulas...)?

Why they sopped working?
How you reactivated them?
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.
CalcOfficer
Posts: 8
Joined: Thu Jun 07, 2018 3:22 pm

Re: [Solved]This formula stopped working

Post by CalcOfficer »

How we can guess it without a sample file (without the full macro code, without the working formulas...)?
I understand this fully, anyway from my point of view there is no need for further troubleshooting.
Why they sopped working?
How you reactivated them?
If I remember correctly it was related to the file security that was changed for some reason (not by me) to status "high".
After I changed the status to low the macros started to work again.
Windows 10, Apache Open Office 4.1.2
User avatar
Zizi64
Volunteer
Posts: 11360
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: [Solved]This formula stopped working

Post by Zizi64 »

If I remember correctly it was related to the file security that was changed for some reason (not by me) to status "high".
After I changed the status to low the macros started to work again.
It is enough to set the macro security to "Medium". The software will warn you that the file contains some macros, and you can enable or disable them in the actual file by one clicking.
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.
CalcOfficer
Posts: 8
Joined: Thu Jun 07, 2018 3:22 pm

Re: [Solved]This formula stopped working

Post by CalcOfficer »

It is enough to set the macro security to "Medium". The software will warn you that the file contains some macros, and you can enable or disable them in the actual file by one clicking.
Ok, thanks.
By selecting "Low" you can avoid the warning? I think it works in the same way in MS Excel?
Windows 10, Apache Open Office 4.1.2
User avatar
Zizi64
Volunteer
Posts: 11360
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: [Solved]This formula stopped working

Post by Zizi64 »

By selecting "Low" you can avoid the warning? I think it works in the same way in MS Excel?
I do not know how the Excel working. There is not any warning when you set the level to "low" in AOO/LO. (It is dangerous a littlebit...)
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
robleyd
Moderator
Posts: 5085
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: [Solved] SUMIF() formula stopped working

Post by robleyd »

From the Help F1 - search macro security levels:

Medium
Confirmation required before executing macros from unknown sources.
Trusted sources can be set on the Trusted Sources tab page. Signed macros from a trusted source are allowed to run. In addition, any macro from a trusted file location is allowed to run. All other macros require your confirmation.
Low (not recommended)
All macros will be executed without confirmation. Use this setting only if you are certain that all documents that will be opened are safe.
A macro can be set to auto-start, and it can perform potentially damaging actions, as for example delete or rename files. This setting is not recommended when you open documents from other authors.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
Post Reply