Ask Your Question

How to specify "else" condition in conditional formatting?

asked 2018-10-15 13:29:51 +0200

pavion gravatar image

updated 2018-10-15 13:31:07 +0200


I use LibreOffice 6.1.2 on Windows 7. In Calc I have large table with multiple columns. But on one column I would like to conditionally format the colors.

Simplified sample data:

(hundreds of other)

Now I would like to mark with green cells which contains cities: Rome, Paris and London and all remaining cities red (there is huge list of "red" cities, so I can't write conditional rule for each one).

I did:

  1. Mark City column.
  2. Format | Conditional | Condition.
  3. I have set:

    Condition 1: "Cell values is" "equal to" "Rome" Apply Style: Good.

    Condition 2: "Cell values is" "equal to" "Paris" Apply Style: Good.

    Condition 3: "Cell values is" "equal to" "London" Apply Style: Good.

    Question: Now how do define? Condition 4: All remaining cells Apply Style: Bad


edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-10-15 13:34:05 +0200

updated 2018-10-15 13:34:28 +0200

Just apply the "Bad" style by default, without conditional formatting? or just use something like "not blank" as the last item (conditions are evaluated in order, until one matches)?

edit flag offensive delete link more


Thanks a lot. I see I can define "red" color background for whole column and then specify "conditional formatting" only for green cells: Rome, Paris and London. Conditional formatting only overrides formatting for cells that matches the conditional and leaves all other cells (red in my case) untouched.

Thanks very elegant solution.

pavion gravatar imagepavion ( 2018-10-15 14:01:43 +0200 )edit

Excellent answer and the simplest way to proceed.

jim7fl gravatar imagejim7fl ( 2018-10-15 14:44:41 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-10-15 13:29:51 +0200

Seen: 473 times

Last updated: Oct 15 '18