Pinaceous
Well-known Member
- Joined
- Jun 11, 2014
- Messages
- 1,113
- Office Version
- 365
- Platform
- Windows
Hi All,
I'm trying to provide a specific criteria, if I delete/remove a value in Column F and Column B has a color index of 3 with the text "1299" that it will return Column B to a color index of xlNone and clear the contents of the "1299", when the Column F value has been removed with its specific criteria.
I've managed to provide so far where if I delete the value in Column F that it clears the contents of the "1299" of Column B but I cannot remove the interior color of 3 to xlNone.
Here is a sample of my code that I'm working on:
Many thanks in advance!
Pinaceous
I'm trying to provide a specific criteria, if I delete/remove a value in Column F and Column B has a color index of 3 with the text "1299" that it will return Column B to a color index of xlNone and clear the contents of the "1299", when the Column F value has been removed with its specific criteria.
I've managed to provide so far where if I delete the value in Column F that it clears the contents of the "1299" of Column B but I cannot remove the interior color of 3 to xlNone.
Here is a sample of my code that I'm working on:
VBA Code:
Private Sub MessageColumnB(ByVal Target As Range)
Dim n As Long
n = Target.row
If Range("B" & n).Interior.ColorIndex = 3 _
And Range("B" & n) = "1299" _
And Range("F" & n) = "" Then
Cells(n, "B").ClearContents
'Cells(n, "B").Interior.ColorIndex = xlNone =>? - How do I add this part to it?
End If
End Sub
Many thanks in advance!
Pinaceous