Bug 33002 - Sumif formula with external ref does not seem to work
Summary: Sumif formula with external ref does not seem to work
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.0 RC2
Hardware: All macOS (All)
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: target:3.4
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-11 10:45 UTC by Midiar
Modified: 2012-05-04 05:55 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Archive containing S.ods and K.ods (23.29 KB, application/zip)
2011-01-11 10:45 UTC, Midiar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Midiar 2011-01-11 10:45:10 UTC
Created attachment 41890 [details]
Archive containing S.ods and K.ods

Attached 2 simple ods files. S.ods has 2 formulas referencing K.ods. The Sumif formula gives Error 504. The Sum formula works ok.

I have opened the files in OpenOffice.org 3.2.1, and there both formulas work. (And I have been using Sumif formulas like this for a long time, but then also referencing a third file.)

If that is important, I actually created the files using Norwegian app language, using Summer.hvis, the Norwegian equivalent of Sumif.

Using LibO_3.3.0rc2_MacOS_x86_install_en-US, with LibO_3.3.0rc2_MacOS_x86_langpack_nb installed.
Comment 1 Kohei Yoshida 2011-01-11 11:07:12 UTC
My turf.  I'll look into this.
Comment 2 Kohei Yoshida 2011-01-11 13:31:52 UTC
Ok.  Just pushed my fix to master.

http://cgit.freedesktop.org/libreoffice/calc/commit/?id=57ddf99a4b3cc2340d3d5fdb3ae4ac268cb89076

The fix will be in 3.4.
Comment 3 Midiar 2011-01-14 14:32:33 UTC
I just found that this also fails for Countif. I just edited the Sumif in S.ods to use Countif and drop the last parameter.

Tried it both on LibO_3.3.0rc2_MacOS_x86_install_en-US and LibO_3.3.0rc3_MacOS_x86_install_en-US.

Sad to hear we'll have to wait till 3.4, but RC is RC.
Comment 4 Kohei Yoshida 2011-01-14 14:42:39 UTC
Could you file a separate bug for that?
Comment 5 Midiar 2011-01-14 15:04:13 UTC
Done. Bug 33137.
Comment 6 wope 2011-02-08 05:00:48 UTC
target 3.4 is to late, some people can't use LibO. OOo 3.3.0 works fine
Comment 7 Reto 2011-03-19 06:07:33 UTC
This bug is not only true for SUMIF and COUNTIF but for any conditional calculation.

So, all external references like "'file:///tmp/file.ods'#$table.A1" work as is but can't be used for generating TRUE / FALSE-values as follows: 'file:///tmp/file.ods'#$table.A1=A2

Due to that I guess this seems to be kind of a more general issue.
Comment 8 Reto 2011-03-19 06:08:48 UTC
This bug is not only true for SUMIF and COUNTIF but for any conditional calculation.

So, all external references like "'file:///tmp/file.ods'#$table.A1" work as is but can't be used for generating TRUE / FALSE-values as follows: ='file:///tmp/file.ods'#$table.A1=A2

Due to that I guess this seems to be kind of a more general issue.
Comment 9 Kohei Yoshida 2011-03-21 16:49:32 UTC
General issue, yes, but the code still needs to be adjusted on a individual function basis.

I've done major fixes in the 3.4 code base, so please test again when the first 3.4 beta arrives.
Comment 10 Reto 2011-03-22 13:48:26 UTC
Ok! But, do I get it right, if the code for SUMIF and COUNTIF is adjusted on a individual function basis, as side-effect the formula "='file:///tmp/file.ods'#$table.A1=A2" will also work again?
Comment 11 Kohei Yoshida 2011-03-22 13:59:39 UTC
Internally everything is a function, even those '+', '-', '/', '*', '=' etc..  So my comment still holds.

Again, please test it with 3.4 beta, and report back any problem you'll find there (with new bugs filed).
Comment 12 Midiar 2011-04-23 03:19:45 UTC
I checked this on LibO_3.4.0beta2_MacOS_x86_install_en-US.dmg, and Sumif was working in my sample files.
Comment 13 wope 2011-04-23 05:18:07 UTC
I've testet it with Win 7 and SuSE 11.4, all seems ok
Comment 14 Roman Eisele 2012-05-04 05:55:49 UTC
This is a Calc issue, therefore changed the 'Component' field accordingly.