Hi,
I have 2 macros that i'd like to combine. Please see below. Can someone help? Thanks
I have 2 macros that i'd like to combine. Please see below. Can someone help? Thanks
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
Set KeyCells = Range("CE1")
Dim r1 As Range, r2 As Range
Set r1 = Range("CE1")
Set r2 = Range("D5")
If r1.Value = 1 Then
r2.Interior.Color = vbWhite
Else
r2.Interior.Color = 6
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
Set KeyCells = Range("CF1")
Dim r1 As Range, r2 As Range
Set r3 = Range("CF1")
Set r4 = Range("D5")
If r1.Value = 1 Then
r2.Interior.Color = vbWhite
Else
r2.Interior.Color = 6
End If
End Sub