I have a spreadsheet that has a column of cells where each cell contains a single word. I would like to count the occurrences of some words. I can use the COUNTIF function for most words, but if the word is "true" or "false", I get 0.

AB1apples 22true 03false 04oranges 15apples

In the above spreadsheet table, I have these formulas in cells B1, B2, B3 and B4:

```
=COUNTIF(A1:A5,"apples")
=COUNTIF(A1:A5,"true")
=COUNTIF(A1:A5,"false")
=COUNTIF(A1:A5,"oranges)
```

As you can see, I can count apples and oranges, but not true or false. I have also tried this:

```
=COUNTIF(A1:A5,TRUE)
```

But that does not work either.

Note -- I am using Excel 2007.

`=COUNTIF(A1:A5,"<truf")-COUNTIF(A1:A5,"<=trud")`

counts every string thatbeginswith “true” or “trud”, such as “trudge”. – Scott May 29 '13 at 23:26