title: Excel MsgBox with VBA for multiple linked range
body: <p>I need some help with an excel problem.</p>
  
  <p>It is a combination of the two problems below:</p>
  
  <p>1) <a href="https://stackoverflow.com/questions/15267766/excel-popup-message-with-sound-alert-when-cell-value-meets-certain-criteria">Excel - Popup message with sound alert when cell value meets certain criteria</a></p>
  
  <p>2) <a href="https://stackoverflow.com/questions/10013285/vba-code-to-show-message-box-popup-if-the-formula-in-the-target-cell-exceeds-a-c">VBA code to show Message Box popup if the formula in the target cell exceeds a certain value</a></p>
  
  <p>In <strong>Sheet1</strong>, I have a range of products and sales figure.
  Example: <a href="https://i.stack.imgur.com/Ktiuv.png" rel="nofollow noreferrer">Sheet1</a></p>
  
  <p>In <strong>Sheet2</strong>, I have multiple columns of sumif() functions. Example: <a href="https://i.stack.imgur.com/NSYAF.png" rel="nofollow noreferrer">Sheet2</a>.
  It contains a column of names in (A:A) and data in (B:B) &amp; (C:C) which are linked to cells in other sheets. I would like a pop up notification saying ("Text in column A" sold is > 20) when the value of any cell in column B exceeds 20 or column C exceeds 40. </p>
  
  <p><strong>For example</strong>: If one of the cell value in column "B" gets updated to 33 (which is >20) and the corresponding cell value in column "A" contains text as "Charlie", excel sheet should popup message saying "Charlie sold is > 20". </p>
  
  <p>The below VBA code accomplishes this <strong>IF</strong> it was raw data. However, it does not work when the cells are linked to data from other sheets, as in the case of this workbook.</p>
  
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
     If Target.column = 2 and target.value &gt; 1 Then
         MsgBox target.offset(0,-1).text &amp; " sold is &gt; 20"
     End If
  End Sub
  </code></pre>
  
  <p>This alternative code works with data linked from other sheets, however it only applies to a specific cell, not an entire column.</p>
  
  <pre><code>Private Sub Worksheet_Calculate()
  
  If Sheets("Sheet2").Range("B2").Value &gt; 20 Then
      MsgBox "B2 is &gt;20", vbOKOnly
  End If
  
  End Sub
  </code></pre>
  
  <p><strong>What I'm trying to achieve is this</strong>: As I input my raw data in Sheet1, the figures in Sheet2 column(B:B) and column(C:C) get updated. Once any of the cells in Sheet2 column(B:B) exceed 20 or column(C:C) exceed 40, there will be a popup notification that links back to column A text such as <code>MsgBox target.offset(0,-1).text &amp; " sold is &gt; 20"</code>. Is there a way to combine the above two codes to achieve this? 
  Any alternative solutions are welcome too, thank you!</p>