# Case sensitivity using calc countif function

Docs say to go to Tools->Options->LibreOffice Calc->Calculate and check ‘Case Sensitive’. I’ve done; and actually it was already set.

I tried “enable regular expressions…” too; same results.

a1 = a

a2 = A

b3 = countif(a1:a2, “A”) returns 2

b4 = countif(a1:a2, “a”) returns 2

The answer is: COUNTIF is not case sensitive (it’s not case sensitive in Excel either)

The solution is:

b3 =SUMPRODUCT(EXACT(“A”;A1:A2))

b4 =SUMPRODUCT(EXACT(“a”;A1:A2))

Excel’s solution is wildcards! If…
A1 = CAR
A2 = Car
A3 = car

The solution is 3 using the formula:
=COUNTIF(A1:A3,"`*car*`")

In LibreOffice the double quotes `"car"` is all you need. My issue is when the word has other characters too!

hmmm… so the case sensitive checkbox is not universally used. that seems odd.

@usacoder, maybe that can be changed… You can always ask for an Enhancement request at https://www.libreoffice.org/get-help/bug/ or at https://bugs.freedesktop.org/enter_bug.cgi?product=LibreOffice