How can I set a rules to turn the row backround Yellow and also apply a pattern to some specific columns of this same row, only using VBA ?
Sub FormatRange()
Dim MyRange As Range, listSep As String
Set MyRange = Range("MyBoard")
listSep = Application.International(xlListSeparator)
MyRange.FormatConditions.Delete
MyRange.FormatConditions.Add Type:=xlExpression, formula1:="=ISNUMBER(SEARCH(" & _
"""Customer""" & listSep & MyRange.cells(1, 1).Address(0, 1) & "))"
MyRange.FormatConditions(1).Interior.Color = RGB(255, 255, 0)
MyRange.FormatConditions(1).Interior.Pattern = xlGray75
End Sub
Can I just specify the column letter at the same time as the Range ? (column B/C/E/H)
FormatConditionsfor only a column, or for discontinuous columns range? Something like "B2:C10", "E2:E10", "H2:H10""MyBoard"named range contains the mentioned columns and separated of theFormatConditionsalready applied with the above code, do you want a second one to be applied only to the mentioned columns (inside the named range)?