Hello
First of all, many thanks to all those people who help others with their problems!
I'm working on something which in I have to use conditional formatting. I've used VBA to have a 5th condition.
Here the VBA-code:
I entered the other conditions on the normal way (format -> Cond. Formatting)
If I enter an 'A' now, the cell turns yellow. That's good, but when I remove the A, it stays yellow. I want that it turns back to its normal format settings.
Can anyone help me ?
Thanks
Thomas
BTW: I'm dutch, so my english isnt that good
First of all, many thanks to all those people who help others with their problems!
I'm working on something which in I have to use conditional formatting. I've used VBA to have a 5th condition.
Here the VBA-code:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Cell As Range
Dim Rng1 As Range
On Error Resume Next
Set Rng1 = ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas, 1)
On Error GoTo 0
If Rng1 Is Nothing Then
Set Rng1 = Range(Target.Address)
Else
Set Rng1 = Union(Range(Target.Address), Rng1)
End If
For Each Cell In Rng1
Select Case Cell.Value
Case "A"
Cell.Interior.ColorIndex = 6
Cell.Font.ColorIndex = 6
Case "a"
Cell.Interior.ColorIndex = 6
Cell.Font.ColorIndex = 6
End Select
Next
End Sub
I entered the other conditions on the normal way (format -> Cond. Formatting)
If I enter an 'A' now, the cell turns yellow. That's good, but when I remove the A, it stays yellow. I want that it turns back to its normal format settings.
Can anyone help me ?
Thanks
Thomas
BTW: I'm dutch, so my english isnt that good