davidmyers
Board Regular
- Joined
- Jan 29, 2017
- Messages
- 88
- Office Version
- 2016
- Platform
- Windows
Hi, Need a little guidance (or was that gui dance?)
I'm trying to check the font color of each of each cell in the current row, not sure how to do it, this is what I have so far - I'm getting an error of Type mismatch on the range
Don't know if I need a range to loop thru current row?
Any help appreciated
David
I'm trying to check the font color of each of each cell in the current row, not sure how to do it, this is what I have so far - I'm getting an error of Type mismatch on the range
Code:
Sub KeepRed(defaultcolor)
Dim rng As Range, cell As Range
Set rng = ActiveCell.Row
For Each cell In rng
If Not (cell.Font.ColorIndex = 3) Then
cell.Font.ColorIndex = defaultcolor
End If
Next cell
End Sub
Don't know if I need a range to loop thru current row?
Any help appreciated
David