Highlight duplicate values

Edgar Oliveira picture Edgar Oliveira · Mar 6, 2016 · Viewed 35.3k times · Source

In Excel, Office 2007, I have the option to highlight duplicate values on the menu. Keep simple! Select the column, select "Conditional Formatting" - "Highlight Cells Rules" - "Duplicate Values" and voilá! All values that were duplicate on this column it was paint with color red, for example.

Actually I use the LibreOffice Calc, version 5.0.3.2, and I can't find this option on the menu!

How can I do this job?

Answer

user4039065 picture user4039065 · Mar 6, 2016

Select the column of numbers and note the 'active cell' (A1 in the sample image below). Go to Format ► Conditional Formatting and set up a rule as a formula using COUNTIF(A$1:A$15; A1)>1.

   calc_duplicate_formatting

It is important to get the 'active cell' correct. If the 'active cell' was A15 then that formula would be COUNTIF(A$1:A$15; A15)>1.

I've also put the formula in column C so that you can see how each row resolved to TRUE or FALSE.