View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default Conditional Formating (If statements)

Right-click Sheet, click 'View Code', and paste this into the window that
opens:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rnArea As Range
Dim rnCell As Range

With rnCell
If Range("F12").Value = 10 And Range("F12").Value <= 15 Then

Range("B4").Interior.ColorIndex = 6
Else: Range("B4").Interior.ColorIndex = 0

End If
End With
End Sub


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Marc" wrote:

In the conditional formatting box how would I make B4 turn yellow if F12 is
between 10 and 15?