Bug 102623 - Including a parentheses character in a cell causes Countif return an incorrect result.
Summary: Including a parentheses character in a cell causes Countif return an incorrec...
Status: CLOSED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-27 12:13 UTC by David Sarnowski
Modified: 2016-09-27 12:29 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
This sheet contains the test case described in the bug report (10.33 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-09-27 12:15 UTC, David Sarnowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Sarnowski 2016-09-27 12:13:20 UTC
User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:49.0) Gecko/20100101 Firefox/49.0
Build Identifier: LibreOffice 5.2.1.2

I have a spreadsheet with data in one column and I am using the formula =Countif(A:A,A1) to count the number of instances of certain values in the column. When certain combinations of parentheses characters are included in the cell, the countif formula returns a value of zero (0).

Excel correctly calculates the instances of the values in the column.

Reproducible: Always

Steps to Reproduce:
1. Create a new spreadsheet

2. Paste the following data into column A:
A
B
C
A
D
E
F
Chicken
Dog
Cat ()
()
(
)
Cat )
Cat (
Cat (
Cat )
Chicken


3. In cell B1 enter the following formula "=COUNTIF(A:A,A1)".

4. Copy this formula down in column B so each value in the column A has a corresponding formula in column B.
Actual Results:  
The formula in column B returns the following results:

2
1
1
2
1
1
1
2
1
0
0
1
1
0
0
0
0
2


Expected Results:  
The results in column B should be 

2
1
1
2
1
1
1
2
1
1
1
1
1
2
2
2
2
2


[Information automatically included from LibreOffice]
Locale: en-US
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Mac OS X (All)
OS is 64bit: no


Reset User Profile?No
Comment 1 David Sarnowski 2016-09-27 12:15:57 UTC
Created attachment 127670 [details]
This sheet contains the test case described in the bug report
Comment 2 Eike Rathke 2016-09-27 12:29:18 UTC
Parentheses are regular expression meta characters, disable regular expressions under Tools - Options - Calc - Calculate "General Calculations". For Excel compatibility select wildcards instead.