Bug 36740 - Function ZÄHLENWENN does not recognize a text with a '+' character
Summary: Function ZÄHLENWENN does not recognize a text with a '+' character
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-01 06:02 UTC by Thomas
Modified: 2015-01-19 12:51 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
example sheet, macros not necessary to start (70.53 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-05-02 09:30 UTC, Thomas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas 2011-05-01 06:02:55 UTC
I use Calc for evaluating class-tests. Therefore I have a list of class-test-grades as cells (containing text): 1+, 1, 1-, 2+, 2, 2-, ...

So I use the function (in german) "ZÄHLENWENN" to count the number of any grade.
But every grade with a '+' is not recognized, so I get 0 as result. The '-'-grades are counted well.


My Workaround is to use another character.


Version:
LibreOffice 3.3.2 
OOO330m19 (Build:202)
tag libreoffice-3.3.2.2, Ubuntu package 1:3.3.2-1ubuntu4
Comment 1 GerardF 2011-05-02 02:48:56 UTC
(In reply to comment #0)
> I use Calc for evaluating class-tests. Therefore I have a list of
> class-test-grades as cells (containing text): 1+, 1, 1-, 2+, 2, 2-, ...
> 
> So I use the function (in german) "ZÄHLENWENN" to count the number of any
> grade.

COUNTIF in english

> But every grade with a '+' is not recognized, so I get 0 as result. The
> '-'-grades are counted well.

Try with your data : 1+, 1, 1-, 2+, 2, 2-
with =COUNTIF(A1:A6;"1+")
and =COUNTIF(A1:A6;B1) with B1 containing 1+ (as text)

Regular expression enabled or disabled.

Works for me. With the same build under Windows Vista.

Can you give more information and upload an attachment (.ods) ?
Comment 2 Thomas 2011-05-02 09:30:10 UTC
Created attachment 46258 [details]
example sheet, macros not necessary to start
Comment 3 Thomas 2011-05-02 09:37:03 UTC
(In reply to comment #2)
> Created an attachment (id=46258) [details]
> example sheet, macros not necessary to start

Hi, I've tried it in an empty sheet and there it works for me, too.
That's a bit strange, but I got the final grades using formulas with compare
and index. So perhaps something goes wrong there.

I have attached my sheet with the problem. The final grades are in column av
and ax, whereas ax becomes the grade in av degreed by a given step in aw. 
The grades are in BI3:BI18 and the countif-function is used in BN3:BN18

I've prepared it so you can easily see the effect (hopefully). If you change
the grade "3†" (with my workaround-symbol) to "3+" then counting fails !

But I've noticed that already ax get wrong (with compare and index): perhaps
those get wrong and not countif.
Comment 4 GerardF 2011-05-02 10:18:31 UTC
In menu Tools > Options > LibreOffice Calc > Calculate
unchecked Enable Regular expressions in formulas.

Error is cause by MATCH function :
MATCH(AV10;cNotenBezeichnung;0) display the wrong value with the sign + (display 3 instead of 3+). He search 3 or more 3 (3, 33, 333 etc).

So it is not a bug.
Comment 5 Thomas 2011-05-02 10:45:45 UTC
(In reply to comment #4)
> In menu Tools > Options > LibreOffice Calc > Calculate
> unchecked Enable Regular expressions in formulas.
> 
> Error is cause by MATCH function :
> MATCH(AV10;cNotenBezeichnung;0) display the wrong value with the sign +
> (display 3 instead of 3+). He search 3 or more 3 (3, 33, 333 etc).
> 
> So it is not a bug.

ah thanks, I've not thought about regular expressions indeed,
and sorry, for false bug report