简体   繁体   English

Excel上的条件格式引用了另一个数据集

[英]Conditional formatting on excel referencing another data set

I have a spreadsheet with dates in column c and a list of corresponding names in column H. I want to conditionally format the sheet so that if a name appears on the same date more than once, it will alert me. 我在电子表格中的c列中有日期,而在H列中有相应名称的列表。我想有条件地设置工作表的格式,这样,如果一个名称在同一日期出现多次,它会提醒我。 For example, if I have 1st January in cells c1:c15 and the name Joe Bloggs in cells H1 & H5 I would want The two Joe Bloggs' in those cells to turn red, however, if there was also a Joe Bloggs in H17 I would not want that to turn red. 例如,如果我在单元格c1:c15中有1月1日,并且在单元格H1和H5中有Joe Bloggs的名称,我希望这些单元格中的两个Joe Bloggs变成红色,但是,如果H17中还有一个Joe Bloggs,我不想说变红。 I know I can probably do this by splitting the data into chunks and just doing duplicates for each day of the month but I would prefer for it to all be automated, so I wouldn't have to split it into chunks each month and adjust things when I have to add new data. 我知道我可以通过将数据拆分为大块,然后在每月的每一天进行重复操作来做到这一点,但是我希望将其全部自动化,因此我不必每个月将其拆分为大块并进行调整当我必须添加新数据时。

You can just count how many duplicates there are (with same name and date) and see if the total is greater than 1 with Countifs: 您可以只计算有多少个重复项(具有相同的名称和日期),并使用Countifs来查看总数是否大于1:

=COUNTIFS(C$1:C$20,C1,H$1:H$20,H1)>1

Then enter this as a formula in conditional formatting. 然后以条件格式将其作为公式输入。

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

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