abdelfattah
Well-known Member
- Joined
- May 3, 2019
- Messages
- 1,429
- Office Version
- 2019
- 2010
- Platform
- Windows
hello
I have this code what I'm trying when fill the values in column C should highlight the range from COL A: COL C and if the cells in COL C are empty then shouldn't highlight
I note when I press twice in empty cells in COL C also highlight by yellows color how can I fix it please ?
I have this code what I'm trying when fill the values in column C should highlight the range from COL A: COL C and if the cells in COL C are empty then shouldn't highlight
I note when I press twice in empty cells in COL C also highlight by yellows color how can I fix it please ?
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
If Not Intersect(Target, Columns("C:C")) Is Nothing Then
For Each cell In Intersect(Target, Columns("C:C"))
If IsNumeric(cell) Then
cell.Interior.Color = 65535
Else
cell.Interior.Pattern = xlNone
End If
Next cell
End If
End Sub