如何在条件格式规则管理器填充中制作公式(取决于它所应用的单元格)
How to make formula in conditional formatting rule manager filldown (varies depending on cell it's applied to)
我正在使用条件格式规则管理器和公式 below.If 以下语句为真,则单元格颜色设置为红色,字体颜色设置为黄色:
=IF($A-$A7>60,IF(B7>0,TRUE,FALSE),FALSE)
我希望 B7 根据公式所在的单元格而变化。无论如何我可以在不使用 VBA/macros 的情况下做到这一点 - 只是 excel 公式。
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
我正在使用条件格式规则管理器和公式 below.If 以下语句为真,则单元格颜色设置为红色,字体颜色设置为黄色:
=IF($A-$A7>60,IF(B7>0,TRUE,FALSE),FALSE)
我希望 B7 根据公式所在的单元格而变化。无论如何我可以在不使用 VBA/macros 的情况下做到这一点 - 只是 excel 公式。
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