Ask Your Question
1

countif does not count cells that have . ( ) and other non aphabetic characters. [closed]

asked 2012-11-01 23:09:31 +0200

adrian.rolla gravatar image

updated 2013-06-17 00:17:28 +0200

manj_k gravatar image

Countif does not count cells that have . ( ) and other non aphabetic characters.
Lets use an example having the following data in colum A:
hello
hi.
hi.
how are you (hi)
how are you (hi)
how are you (hi)

and having the formula =countif(A:A,Ax) in each row of column B, where x is the row number, will calculate rows like this:
hello 1
hi. 0
hi. 0
how are you (hi) 0
how are you (hi) 0
how are you (hi) 0

instead of what should be:
hello 1
hi. 2
hi. 2
how are you (hi) 3
how are you (hi) 3
how are you (hi) 3

how can this bug be solved?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-10-18 23:09:17.670886

2 Answers

Sort by » oldest newest most voted
1

answered 2012-11-01 23:41:11 +0200

m.a.riosv gravatar image

updated 2012-11-01 23:41:52 +0200

Because this characters are used in the regular expressions.

Two options:

-Deactivate the use of regular expression in Menu/Tools/Option/Calc/calculate.

-Put an \ before every special character in the search expression.

Look in the help for regular expressions.

edit flag offensive delete link more
0

answered 2012-11-12 13:46:10 +0200

adrian.rolla gravatar image

Thanks a lot for the help. If I can make a suggestion, regular expression default should be off. Basic users are not aware about regular expressions and understand this as malfuction, I consider that is error prone. Nevertheless, thanks again for your help!!!

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-11-01 23:09:31 +0200

Seen: 904 times

Last updated: Nov 12 '12