突出显示重复值

Highlight duplicate values

在 Excel Office 2007 中,我可以选择突出显示菜单上的重复值。保持简单! Select 专栏,select "Conditional Formatting" - "Highlight Cells Rules" - "Duplicate Values" 瞧!例如,此列上所有重复的值都被涂成红色。

其实我用的是LibreOffice Calc,版本5.0.3.2,我在菜单上找不到这个选项!

我该如何做这份工作?

Select 数字列并记下 'active cell'(下图中的 A1)。转到格式 ► 条件格式并使用 COUNTIF(A:A; A1)>1.

将规则设置为公式

'active cell' 正确很重要。如果 'active cell' 是 A15 那么该公式将是 COUNTIF(A:A; A15)>1.

我还将公式放在 C 列中,以便您可以看到每一行如何解析为 TRUE 或 FALSE。

不完全是这个具体问题的解决方案,但我发现当您对有问题的列进行排序时,以下内容非常方便,尤其是当您按多列排序时:

如果要格式化单元格中与 紧靠其上方的值 、select 整个列重复的任何值,请在条件格式

(INDIRECT(CELL("address"))=OFFSET(INDIRECT(CELL("address"));-1;0))

在排序的列中,第一次出现的值将被视为 "unique",因为它尚未出现,然后标记紧随其后的所有重复项(我通常使用字体颜色为浅灰色)。如果该列不是主要顺序(即排序标准中的第 2 位或更靠后的顺序),则每次对该列重新开始排序时 "uniqueness" 实际上是 "reset"。

在 LibreOffice Calc 6.0.7.3 中,这可以通过以下步骤完成 (from this link):

Select column A by clicking on the header character A (the top of the column)

Select the menu: Format -> Conditional -> Condition...

Condition 1: Cell value is and select duplicate from the dropdown

Apply Style: Select your cell style (e.g. Error or any you defined in advance)

Check that your cell range is A1:A1048576 (You may want to reduce the 1048576 to any reasonable number you assume will be the maximum to ever be used)

Click OK button