ntextreme3
New Member
- Joined
- Jul 17, 2013
- Messages
- 3
Hey, I have a sheet here that auto-populates with a list of warnings/errors. they start at row 3 and keep going until the list is finished. I'm trying to find a way to highlight only errors if there is no false positive message offset 2 columns from that error. This works fine for highlighting errors. I tried running the same code concurrent in column e checking for blanks and set color to 0 but as expected it overwrites the row highlighting already in place, and i cant have that.
what i need is something like
help! thanks in advance
Code:
Sub highlight()
Dim cell As Range
Range(Range("c3"), Range("c3").End(xlDown)).Select
For Each cell In Selection
If cell = "ERROR" Then cell.EntireRow.Interior.ColorIndex = 3
Next cell
End Sub
what i need is something like
Code:
Sub highlight()
Dim cell As Range
Range(Range("c3"), Range("c3").End(xlDown)).Select
For Each cell In Selection
If cell = "ERROR" [U][B]And cell.Offset(0, 2) <> "" [/B][/U]Then cell.EntireRow.Interior.ColorIndex = 3
Next cell
End Sub
help! thanks in advance