Ask Your Question
0

COUNTIF doesn't work for finding text

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

this post is marked as community wiki

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

updated 2013-02-19 02:47:33 +0200

anonymous user

Anonymous

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?

delete close flag offensive retag edit

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 >750 is welcome to improve it.

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

mariosv gravatar image mariosv flag of Spain
5039 23 51

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.

link delete flag offensive edit

Comments

Confirmed.

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

Login/Signup to Answer

Donate

LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!

Question tools

Follow

subscribe to rss feed

Stats

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

Seen: 1,059 times

Last updated: Jun 13 '12