try:Sub AA450_CONDITIONAL1() Dim rg As Range Dim cond1 As FormatCondition Dim Lastrow7 As Long 'GET LAST ROW IN COLUMN J IN THE RECAP SHEET FOR THIS MACRO Lastrow7 = Worksheets("RECAP").Columns("O").Find("*", SEARCHDIRECTION:=xlPrevious, SEARCHORDER:=xlByRows, LookIn:=xlValues).Row 'SET THE RANGE Set rg = Worksheets("RECAP").Range("J5:J" & Lastrow7) 'clear any existing conditional formatting rg.EntireColumn.FormatConditions.Delete 'define the rule for each conditional format Set cond1 = rg.FormatConditions.Add(xlCellValue, xlEqual, "=$H5") 'define the format applied for each conditional format With cond1 .Interior.Color = vbGreen .Font.Color = vbWhite End With End Sub





Reply With Quote