Hi
I would from the expert to find out the problem about suddenly error application defined in this line
this occures when I fill the cells in column C . the column D,E is usaully empty or contains zero value before i fill any thing in theses columns .
the error not always shows but somtimes .
I hope finding solution soonly.
I would from the expert to find out the problem about suddenly error application defined in this line
VBA Code:
.Offset(-1).AutoFilter 1, "<0"
the error not always shows but somtimes .
VBA Code:
Sub HighlightNegatives()
With Range("F2", Range("F" & Rows.Count).End(3))
.Font.Color = vbBlack
.Font.Bold = False
.Offset(-1).AutoFilter 1, "<0"
On Error Resume Next
With .SpecialCells(12)
.Font.Color = vbRed
.Font.Bold = True
End With
On Error GoTo 0
.AutoFilter
.Offset(, 1) = Evaluate(Replace("if(@<0,""the sales is bigger than purchase"","""")", "@", .Address))
.Offset(, 1).Font.Color = vbRed
.Offset(, 1).Font.Bold = True
End With