Hi,

I’m using the following code to add formulas based on data entered into other cells.

Sub ff()
Application.ScreenUpdating = False
Dim Rng As Range
ActiveSheet.Unprotect Password:="Raw Deal"
   For Each Rng In Range("b11:b1000")
I have managed to add data validation to cells as below…

With Cells(Rng.Row, "bd").Validation
        .Delete
        .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
        xlBetween, Formula1:= _
        "1.175, 1.05, 1.00"
        .IgnoreBlank = True
        .InCellDropdown = True
        .InputTitle = ""
        .ErrorTitle = ""
        .InputMessage = ""
        .ErrorMessage = ""
        .ShowInput = True
        .ShowError = True
    End With
But I want to add conditional formatting. I rescored the macro below but can’t seem to adapt it.

Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
        "=AND(B1=""TOTAL"",Z1="""")"
    Selection.FormatConditions(2).Interior.ColorIndex = 3
I will also need the formula below

"=AND(B1=""TOTAL"",Z1="""")"
to be range row based as the other code is….any ideas on how to get round this

thanks