简体   繁体   English

如何为 Excel 中的唯一值使用唯一颜色对列中的重复项进行颜色格式化?

[英]How to color format duplicates in a column with unique colors for unique values in Excel?

I have a column with multiple duplicates.我有一列有多个重复项。

Is there a simple way, to have the unique values filled with the same unique colors?有没有一种简单的方法,可以用相同的独特颜色填充独特的价值?

Ex.前任。 if I have this column如果我有这个专栏

Col A
a
a
a
b
b
b
c
c
c

the a values will be filled with yellow, the b values filled with red, the c values filled with green. a 值用黄色填充,b 值用红色填充,c 值用绿色填充。 But I don't know the "exact text" values (He in the example I know the value 'a', 'b' and 'c'. But in reality I don't know the exact text. I just know there are duplicates).但我不知道“精确文本”值(他在示例中我知道值 'a'、'b' 和 'c'。但实际上我不知道确切的文本。我只知道有重复)。 So this must be generic..所以这必须是通用的..

This requires that the first row is a header and data must be sorted:这要求第一行是标题并且必须对数据进行排序:

Use conditional formatting with the following formula:使用具有以下公式的条件格式:

=ISODD(SUMPRODUCT(--(A$2:A2<>A$1:A1)))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM