-2

我正在尝试根据触发警报的交易时段(伦敦、伦敦和美国、美国以及下班后)找到最有效的方法来为我的时间提供颜色代码(4 种不同颜色)。我尝试了多种方法,但都没有提供正确的结果。

例如,如果警报在 07:05:33 触发,则触发发生在 LONDON 和 USA 会话中,应显示为绿色。如果警报出现在 02:22:33,那么那是在伦敦时段,该字段应该是蓝色的。这些只是几个例子。如果未提供时间值,则相应的字段需要保持未填写。我想包括一张照片,但到目前为止还没有建立足够的声誉点。所以......我将尝试对我所拥有的东西进行口头描述,并尽我所能描述它。

我的警报信号位于 e11:e61... E 列是我想要着色的列。

会话如下...

London Only    2:00:00 - 6:59:59  (Dark Blue)
London & USA   7:00:00 - 9:59:59  (Green)
USA Only       10:00:00 - 4:00:00 (Dark Orange)
After Hours    4:00:01 - 23:59:59 (Light Blue)
After Hours    0:00:01 - 01:59:59

不知道如何在 Excel 中对整个列进行编程来执行此操作。我在电子表格上看到过多种颜色,但不知道是手动的还是自动的。由于为每个单元格着色所需的数据量和时间,我会假设是自动的。

不知道我是否可以直接通过输入单元进行编程。如果没有,我还设置了一个小型会话参考表。

J5:K5 represent 2:00:00 - 06:59:59
J6:K6 represent 07:00:00 - 09:59:59
J7:K7 represent 10:00:00 - 4:00:00
J8:K8 represent 04:00:01 - 23:59:59
J9:K9 represent 00:00:01 - 01:59:59

不确定是否需要,如果不需要...我将删除。无论有什么建议/建议都会有很大的帮助。

4

2 回答 2

1

You can automatically apply conditional formatting to Excel spreadsheets with built-in functions. These will update the cell's color based off the value of the cell, which can be controlled in real-time updates. This works in both newer (2010+) and older versions of Microsoft Office, although newer versions of Office support these features which do not appear in older versions:

  • Data Bars
  • Color Scales
  • Icon Sets
于 2015-01-03T03:03:32.990 回答
0

I was able to solve this problem by following the below steps:

  1. Home>Style>Conditional Formatting
  2. Create New Rule - "Use a formula to determine which cells to format"
  3. I had to create 5 different rules due to my session time setup.
  4. Each rule followed the basic setup: =AND($e11>=TIME(7,0,0),$e11<=TIME(9,59,59))
  5. I only had to change the time data for each of the five.

It is working perfectly now! Hope that this is hellpful to others.

于 2015-01-03T04:16:23.530 回答