[英]Conditional Formatting based on Cell Text
I have the data in the columns ABCD in one sheet and a pivot based on that data on another.我在一张工作表中的 ABCD 列中有数据,在另一张纸上有一个基于该数据的数据透视表。 I want to conditional format my pivot table values based on the value of the
Color
column in my data sheet using VBA.我想使用 VBA 根据数据表中
Color
列的值对数据透视表值进行条件格式设置。
What is the Rule that I will need to create here?我需要在这里创建的规则是什么? I recall we can use
Name Manager
for this purpose, but I am not sure how to?我记得我们可以为此目的使用
Name Manager
,但我不确定如何使用?
Use a VLOOKUP
and create 3 rules with the following formulas:使用
VLOOKUP
并使用以下公式创建 3 个规则:
=VLOOKUP(G$2,$A:$D,4)="red"
=VLOOKUP(G$2,$A:$D,4)="yellow"
=VLOOKUP(G$2,$A:$D,4)="green"
And match each condition with the appropriate colour并将每个条件与适当的颜色匹配
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.