title: Compare values from a range of cells to another cell and display msgbox for certain criteria?
body: <p>I have a value in <code>B4</code> I need to pop a msgbox if the values in <code>C7:C10</code> are higher than the value in <code>B4</code>.  I also need a different msgbox to pop if the any of the cell values = 20.  I have it working in the first cell <code>C7</code> but I don't know how to get the range to work.</p>
  
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
      On Error GoTo ExitSub
      Dim One As Long
      Dim Two As Long
  
      One = Range("B4").Value
      Two = Range("C7").Value
  
      If Not (Application.Intersect(Range("B1:D10"), Target) Is Nothing) Then
          If (Two = 20) Then
              MsgBox "This requires a SOW!"
          ElseIf (One &lt; Two) Then
              MsgBox "The Number Exceeds the Package!" &amp; vbNewLine &amp; "Change the package or decrease the number."
          End If
      End If
  
  ExitSub:
  
  End Sub
  </code></pre>
  
  <p>I don't know how to modify the code to look at the range and not just the one cell.</p>