简体   繁体   English

使用条件格式更改单元格颜色

[英]change cell color with conditional format

I wanna ask about Ms. excel.我想问一下excel女士。 maybe it will look so basic for someone who always work with excel.对于总是使用 excel 的人来说,它可能看起来很基础。 so thank you for anyone who help me with this.所以感谢任何帮助我的人。 I have sheet1 and sheet2.我有 sheet1 和 sheet2。 so i want to make cell in column A sheet 1, which have same data exist in column A sheet2 to change color automatically.所以我想在 A 列 sheet 1 中制作单元格,它在 A 列 sheet2 中存在相同的数据以自动更改颜色。

I don't know how to make it work so I made column helper in column c sheet1 with this formula =NOT(ISERROR(MATCH(a2;sheet2:$A$2;$A$1000;))) and get true if the data exist in sheet2.我不知道如何让它工作所以我用这个公式在 c 列 sheet1 中创建了列助手=NOT(ISERROR(MATCH(a2;sheet2:$A$2;$A$1000;)))并且如果数据为真存在于 sheet2 中。 and then I drag that formula so all column c have this formula.然后我拖动那个公式,所以所有 c 列都有这个公式。 I thinking using conditional formatting, so I block column A in sheet 1, and make conditional formatting with formula =C:C= "TRUE"我想使用条件格式,所以我屏蔽了工作表 1 中的 A 列,并使用公式 =C:C= "TRUE" 进行条件格式设置

but this not work.但这行不通。 i really a newbie and only study by myself from internet, but i dunno how to search to solve this problem.我真的是一个新手,只能自己从网上学习,但我不知道如何搜索来解决这个问题。 any help or advice for this problem?对这个问题有什么帮助或建议吗? thank you so much before非常感谢你之前

Try the following formula in CF rule.在 CF 规则中尝试以下公式。

=COUNTIF(Sheet2!$A:$A,"*"&$A1&"*")>0

在此处输入图像描述

You can put the formula that returns TRUE or FALSE directly into the conditional formatting rule.您可以将返回TRUEFALSE的公式直接放入条件格式规则中。

You should define it on cell A2 first, then change the 'Applies to' range to be all the rows you want to test.您应该首先在单元格A2上定义它,然后将“适用于”范围更改为您要测试的所有行。 If you can, I recommend you try to avoid using references like C:C .如果可以,我建议您尽量避免使用C:C之类的引用。

So, supposing you want to test the data in cells A2:A10 on sheet1, then your rule would look something like this:因此,假设您要测试工作表 1 上单元格A2:A10中的数据,那么您的规则将如下所示:

在此处输入图像描述

Note that my locale uses comma as parameter separator and not semi-colon, so you should adjust accordingly.请注意,我的语言环境使用逗号作为参数分隔符而不是分号,因此您应该相应地进行调整。

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

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