ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,832
- Office Version
- 2007
- Platform
- Windows
Hi,
The worksheet cells are currently yellow as standard.
The range in question is G9 & continues down the page
Any cell that has no value for its interior colour to then be shown as Red until a value is added then it will be yellow again.
The code i thought that would do it "shown in red below" was added into an existing working code.
The existing code works however my added code doesnt.
The worksheet cells are currently yellow as standard.
The range in question is G9 & continues down the page
Any cell that has no value for its interior colour to then be shown as Red until a value is added then it will be yellow again.
The code i thought that would do it "shown in red below" was added into an existing working code.
The existing code works however my added code doesnt.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If .Column = 1 Then Exit Sub
If .Column = 7 Then Exit Sub
If .Count = 1 And Not .HasFormula Then
Application.EnableEvents = False
.Value = UCase(.Value)
Application.EnableEvents = True
[COLOR=#ff0000] If Range("G9:G") = "" Then[/COLOR]
[COLOR=#ff0000] Range("G9:G").Interior.ColorIndex = 3[/COLOR]
End If
End With
End Sub