How do I conditionally format a cell in Google Sheets based on matching values in 2 other columns?

不想你离开。 提交于 2019-12-13 22:15:39

问题


So here is what I am trying to do. I have a value in C1 let's say. I would like to like to highlight that cell if:

  • The value in B1 exists somewhere else in Column B(I'll call it Bn)
  • The values for A1 and An in this other row also match

So if B1 is 12:00 and A1 is Foo I want to highlight C1 if a cell(Bn) in Column B is 12:00 and the value of An is Foo.

Make sense?


回答1:


1.Click the Format menu and select Conditional formatting....

2.Switch to the "Custom formula" option in the drop-down menu.

3.Add in the relevant formula, rules, and cell range.

Formula: =AND(COUNTIF(A:A,A1)>1,COUNTIF(B:B,B1)>1)

Cell Range: $C - The entire C column

4.Click Save rules.



来源:https://stackoverflow.com/questions/27952310/how-do-i-conditionally-format-a-cell-in-google-sheets-based-on-matching-values-i

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!