Guidolavespa
New Member
- Joined
- Nov 14, 2022
- Messages
- 3
- Office Version
- 365
- Platform
- Windows
How to chnage slected cell in VB yellow and offset left 2 cells in green. By next click derase this and do same with new selcted cells.
I have this working but not erasing...
I have this working but not erasing...
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not ActiveCell.Column <> 4 Then
With Target
.Worksheet.Cells.FormatConditions.Delete
.FormatConditions.Add xlExpression, , "TRUE"
.Interior.Color = vbYellow
.Offset(0, -3).Interior.Color = vbGreen
End With
End If
End Sub