I am trying to override conditional formatting (which sets left border of a cell at a certain condition) when I manually format left border to anything. I have coded custom formula to detect if a cell has a left border using VBA.
Public Function ISLEFTBORDERED(rng As Range) As Boolean
If rng.Borders.Item(xlEdgeLeft).LineStyle <> -4142 Then ISLEFTBORDERED = True
Public Function ISRIGHTBORDERED(rng As Range) As Boolean
If rng.Borders.Item(xlEdgeRight).LineStyle <> xlLineStyleNone Then ISRIGHTBORDERED = True
And conditional formatting references this formula to figure out if condition is satisfied at cell B1 for example and if the left border of cell B1 should be set.