【问题标题】:How to make formula in conditional formatting rule manager filldown (varies depending on cell it's applied to)如何在条件格式规则管理器填充中制作公式(因应用的单元格而异)
【发布时间】:2016-01-19 03:27:06
【问题描述】:

我正在使用带有以下公式的条件格式规则管理器。如果以下语句为真,则单元格的颜色设置为红色,字体颜色设置为黄色:

=IF($A$2-$A7>60,IF(B7>0,TRUE,FALSE),FALSE) 

我希望 B7 根据公式所在的单元格进行更改。无论如何我可以在不使用 VBA/宏的情况下做到这一点 - 只是 excel 公式。

【问题讨论】:

    标签: excel vba formatting conditional


    【解决方案1】:
    Please look into the below code, you can change the condition as per your requirement    
    
    
    Dim Redcolour As Long
    Dim yellowcolour As Long
    
            Redcolour = RGB(255, 0, 0)
            yellowcolour = RGB(255, 255, 0)
    
        If Condition Then
    
    
            ActiveSheet.Range("b7").Interior.Color = Redcolour
            ActiveSheet.Range("b7").Font.Color = yellowcolour
    
         End If
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-03-03
    • 2014-04-22
    • 2020-10-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多