简体   繁体   English

默认文本更改时,Excel更改单元格颜色

[英]Excel Change Cell Color when Default Text Changes

I have an Excel worksheet with cells that contain the following default text: 我有一个Excel工作表,其中的单元格包含以下默认文本:

Initials: 
Time:
Pt Name:

These three lines above are the contents of a single cell. 上面的三行是单个单元格的内容。 Each of these values may be filled in at any time. 这些值中的每一个都可以随时填写。 For example: 例如:

Initials: MR
Time: 1800Z
Pt Name: Doe, John

How can I highlight any cells whose values are changed? 如何突出显示其值已更改的任何单元格? That is, not the default text? 也就是说,不是默认文字? I looked at Conditional Formatting, but it doesn't seem to offer a "change event" or some such option. 我查看了条件格式,但是它似乎没有提供“更改事件”或某些此类选项。

在此处输入图片说明

The easiest way to accomplish exactly what you're asking is to use conditional formatting with a "defaults" worksheet (especially if you're going to have a few cells to setup like this, and the default values are subject to change), like this : 实现准确 最简单的方法是什么你问是使用条件格式以“默认”工作表(特别是如果你打算有几个细胞这样的设置,默认值如有更改),如这个 :

1. Set up a "Defaults" worksheet that will hold your default values 1.设置一个“默认值”工作表,其中将保留您的默认值

在此处输入图片说明

2. Set up the conditional formatting on the concerned cells 2.在相关单元格上设置条件格式

在此处输入图片说明


在此处输入图片说明


在此处输入图片说明


在此处输入图片说明

3. Repeat for other default values! 3.重复其他默认值!

As commented, you can try this: 如所评论,您可以尝试以下操作:

Edit1: EDIT1:

Create a named Range like below. 创建一个如下所示的命名范围。
In this example, I used A1 and named it Template . 在此示例中,我使用A1并将其命名为Template

在此处输入图片说明

Then use formula in conditional formatting like this: 然后在条件格式中使用公式,如下所示:

在此处输入图片说明

Then set the Applies to to the entire range of interest like this: 然后将“ 适用范围”设置为整个感兴趣范围,如下所示:

在此处输入图片说明

Then there you go. 然后,您去了。 If it is not equal to Template then it will be highlighted. 如果它不等于模板,那么它将突出显示。 HTH. HTH。

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

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