I have a table 1
Column A has a date, for example. 5/30/2017
Column B has a status such as Success
Column C matters e.g. 500
Requirement: Apply custom conditional formatting in VBA when changing a cell
Let's say the change occurred in columns A, B or C in row 5
Regardless of whether a change has occurred in columns A, B or C, the same logic must be executed.
If the value of column A is less than Now (), then row 5 should be a red background and white text. Further checks should not be performed.
Else If column B is Success, then row 5 should be a green background and white text. Further checks should not be performed.
Else If column C is less than 500, then row 5 should be a blue background and white text. Further checks should not be performed.
Below is the VBA code for checking for a change in a cell - it automatically formats the cell in column b with a hyperlink.
Now I need to auto-format the entire line based on the above criteria.
Private Sub Worksheet_Change(ByVal Target As Range)
If ((Not Intersect(Target, Range("B:B")) Is Nothing) Or (Not Intersect(Target, Range("F:F")) Is Nothing) Or (Not Intersect(Target, Range("G:G")) Is Nothing) Or (Not Intersect(Target, Range("I:I")) Is Nothing)) Then
End If
End Sub