Conditional formatting based on another conditional formatting result

cortexnotion

Board Regular
Joined
Jan 22, 2020
Messages
150
Office Version
  1. 2013
Platform
  1. Windows
Hi All

I am applying conditional formatting to several columns and the formatting is always vbYellow (code below). I would now like to highlight column A in vbRed with any rows that contain any vbYellow cells. Is this possible?

Thanks

VBA Code:
With wbfeedback.Sheets("Feedback")
LR3 = .Range("A" & Rows.Count).End(xlUp).Row
    With .Range("C2:C" & LR3)
        .FormatConditions.Add Type:=xlExpression, Formula1:="=($C2="""")"
        .FormatConditions(1).Interior.Color = vbYellow
    End With
    With .Range("D2:D" & LR3)
        .FormatConditions.Add Type:=xlExpression, Formula1:="=AND($C2=""" & TypeAry(3) & """,$D2="""")"
        .FormatConditions(1).Interior.Color = vbYellow
    End With
    With .Range("E2:E" & LR3)
        .FormatConditions.Add Type:=xlExpression, Formula1:="=AND($C2<>"""",$C2<>""" & TypeAry(0) & """,OR($E2="""",$E2=""Unknown""))"
        .FormatConditions(1).Interior.Color = vbYellow
    End With
    With .Range("F2:F" & LR3)
        .FormatConditions.Add Type:=xlExpression, Formula1:="=OR($F2="""",$F2=""Unknown"")"
        .FormatConditions(1).Interior.Color = vbYellow
    End With
    With .Range("H2:H" & LR3)
        .FormatConditions.Add Type:=xlExpression, Formula1:="=AND($C2=""" & TypeAry(0) & """,OR($H2="""",$H2=""Unknown""))"
        .FormatConditions(1).Interior.Color = vbYellow
    End With
    With .Range("I2:I" & LR3)
        .FormatConditions.Add Type:=xlExpression, Formula1:="=AND($C2=""" & TypeAry(0) & """,OR($F2=""" & AssetAry(0) & """,$F2=""" & AssetAry(1) & """,$F2=""" & AssetAry(2) & """)" & _
        ",OR($I2="""",$I2=""Unknown""))"
        .FormatConditions(1).Interior.Color = vbYellow
    End With
    With .Range("J2:J" & LR3)
        .FormatConditions.Add Type:=xlExpression, Formula1:="=AND($C2=""" & TypeAry(0) & """" & _
        ",OR($F2=""" & AssetAry(0) & """,$F2=""" & AssetAry(1) & """,$F2=""" & AssetAry(2) & """,$F2=""" & AssetAry(3) & """,$F2=""" & AssetAry(4) & """,$F2=""" & AssetAry(5) & """" & _
        "),OR($J2="""",$J2=""Unknown""))"
        .FormatConditions(1).Interior.Color = vbYellow
    End With
End With
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
You can do that by amalgamating all your other rules using OR.
 
Upvote 0

Forum statistics

Threads
1,215,055
Messages
6,122,902
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top