hello i got this code from some member from some forum he told me it works for him but me not it gives me error "invalid procedure call or argument
" and highlight in this line
HTML Code:
.Columns(i).FormatConditions.Add 2, Formula1:="=and(left(" & _
.Cells(1, i).Address(0, 0) & ",3)<>""job""," & "countif(" & _
.Columns(i).Address & "," & .Cells(1, i).Address(0, 0) & ")>1)"
Sub test()
Dim i As Long
With [c1].CurrentRegion
.FormatConditions.Delete
For i = 1 To .Columns.Count
.Columns(i).FormatConditions.Add 2, Formula1:="=and(left(" & _
.Cells(1, i).Address(0, 0) & ",3)<>""job""," & "countif(" & _
.Columns(i).Address & "," & .Cells(1, i).Address(0, 0) & ")>1)"
.FormatConditions(.FormatConditions.Count).Interior.Color = vbRed
Next
End With
End Sub
so i would truly appreciate if any body find out what's the problem with me
thanks in advance