Ask Your Question
0

COUNTIF doesn't work for finding text [closed]

asked 2012-06-13 20:40:32 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

For some reason the countif function does not work for me. Please help me out.

I try to search short words or letters. In the following example I have in a column ("A") simple two letter words in each cell (below each other from row 1-6). Two of them have cc, but the function gives me 0.

aa

aa

cc

aa

cc

aa

=COUNTIF(A1:A6,'cc') gives me "0"

Now the things get even more funny! If I copy the content into B column, then the function in A (cell A7) suddenly shows "2", although the range still indicates only A1:A6. Why does it search in the B column? The same equation under "B" column in cell B7 shows the right result.

aa aa

aa aa

cc cc

aa aa

cc cc

aa aa

2 2

To make things even more weird, if I copy the letters into C column, the same equation in column A gives again a different result! Now it shows a VALUE! error and the equations under B and C give 2.

I would be very grateful for advice. The equation seems to work fine with numbers, but not with text. Is this a bug in libreoffice? Is there an alternative function to use?

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-16 18:48:28.702194

1 Answer

Sort by » oldest newest most voted
1

answered 2012-06-13 22:02:35 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Try changing 'cc' by "cc", the single quotes have different meaning for LibreO. They are used to find automatically as title of row or columns.

edit flag offensive delete link more

Comments

Confirmed.

qubit gravatar imagequbit ( 2013-03-13 09:41:45 +0200 )edit

Question Tools

Stats

Asked: 2012-06-13 20:40:32 +0200

Seen: 11,896 times

Last updated: Jun 13 '12