[英]Conditional formatting formula to highlight appropriate date in range
I need a formula for conditional formatting that will highlight a date between A2:Z2 which matches a number that I enter into a “Committed Sessions Cell” (A1). 我需要一个用于条件格式的公式,该公式将突出显示A2:Z2之间的日期,该日期与我输入“ Committed Sessions单元格”(A1)的数字相匹配。 In row 2 there are a series of numbers that appear above each date column (1,2.3, etc). 在第2行中,每个日期列上方都有一系列数字(1,2.3等)。 For example, if I enter a “3” in cell A1, the date in J3 should match the number 3 above it and be highlighted. 例如,如果我在单元格A1中输入“ 3”,则J3中的日期应与其上方的数字3相匹配并突出显示。 The idea here is to provide a quick visual prompt for how many sessions are in a client's contract. 这里的想法是为客户的合同中的会话数提供快速的视觉提示。
Note: the sequenced numbers 1,2,3 etc in row 2 appear every 5th column (with nothing in between) but there IS other data in between the dates in row 3. Only the appropriate date should be highlighted. 注意:第2行中的序号1,2,3等每第5列出现一次(中间没有任何内容),但第3行中的日期之间还有其他数据。仅应突出显示适当的日期。
A B C D E F G H I J K L M
1 3
2 1 2 3
3. 1/2/14 2/3/14 2/15/14
With grateful thanks, 非常感谢
~ Jay 〜周杰伦
Your example is not consistent. 您的示例不一致。 If you have the date every fifth column, the dates should be in columns A,F,K,P, etc. with 4 columns between 2 points. 如果每五列有日期,则日期应在A,F,K,P等列中,并在2点之间包含4列。
I came up with the following formula: =AND(A2=$A$1,MOD(COLUMN(A3)-1,5)=0) which is applicable to the entire 3rd row. 我想出了以下公式:= AND(A2 = $ A $ 1,MOD(COLUMN(A3)-1,5)= 0)适用于整个第三行。 Create it as follow: 如下创建它:
NOTES : 注意事项 :
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.