Bug 52417 - COUNTIF() wraps all regular expressions with ^ and $
Summary: COUNTIF() wraps all regular expressions with ^ and $
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-23 23:04 UTC by Mike
Modified: 2012-07-24 21:11 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Test file (9.67 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-07-23 23:04 UTC, Mike
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike 2012-07-23 23:04:09 UTC
Created attachment 64571 [details]
Test file

Following the example from http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Regular_Expressions_in_Calc#Regular_expressions_in_Calc_functions I am getting a different result. Entering:

=COUNTIF(cell , "text")

actually becomes:

=COUNTIF(cell , "^text$")

So if a cell contains "123textABC" doing =COUNTIF(cell , "text") will not find a match, however it should. I have attached a test file which produces an error with a few cells.
Comment 1 GerardF 2012-07-24 21:11:20 UTC
Read again the link in your post :
"Additionally if "Search criteria = and <> must apply to whole cells" is ***not*** selected then 'Fred', 'bride', and 'Ridge' will also be counted. "

Please learn how to use a spreadsheet and if something goes wrong ask on user mailing list or forums before submit a bug report.