Conditional formatting with formula

I have a question regarding conditional formatting. I’d like to apply a format with a formula which isn’t based on the actual cell. I want to apply a style on B1 if A1 == ‘abc’ and another style if A1 == ‘def’. What would be the correct formula?
Thanks.

Via the conditional formatting dialogue:

Condition 1
Formula is A1=“abc” …(set style)

Condition 2
Formula is A1=“def” …(set style)

should get you there. Hope this helps.

Should get me there, but it doesn’t. I tried with EXACT() but got the same result. If I use numbers instead of text, it works (A1=1 etc). Could you please check if your method works for you?

Yes, verified in LibreOffice 3.4.6 on OSX 10.7 and LibreOffice 3.5.2 on Ubuntu Linux.

Are you using a recent version of LibreOffice? and on what platform? You are applying the condition formatting to cell B1 from your example?

Perhaps the most important thing is that for character strings it only works with double quotes in the formula. No quotes or even single quotes do not work. And it is case-sensitive (at least on unix-based systems).

Other than these thoughts, I’m out of ideas, I’m afraid.

Man, you are right, the solution is the double quotes. Single and double quotes are interchangeable that’s what I’m used to, so I’ve never thought of using double quotes. My fault. What interesting that LibreOffice 3.5.2 itself wraps text with single quotes automatically.