title: Exclude Cell Range from Worksheet_Change function
body: <p>I'm currently trying to set up a spread sheet which will allow me to keep a track of each time someone in the office changes any information within it, I have got this to work via the following code:- </p>
  
  <pre><code>Dim PreviousValue
  
   Private Sub Worksheet_Change(ByVal Target As Range)
     If Target.Value &lt;&gt; PreviousValue Then
      Sheets("log").Cells(65000, 1).End(xlUp).Offset(1, 0).Value = _
          Application.UserName &amp; " changed cell " &amp; Target.Address _
          &amp; " from " &amp; PreviousValue &amp; " to " &amp; Target.Value
    End If
  End Sub
  </code></pre>
  
  <hr>
  
  <pre><code>Private Sub Worksheet_SelectionChange(ByVal Target As Range)
   PreviousValue = Target.Value
  End Sub
  </code></pre>
  
  <p>Which logs any changes to all the cells in the workbook. However I also have this code:-</p>
  
  <pre><code>Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
   Sheets("MEP 01").Range("D5").Value = Date
   Sheets("MEP 01").Range("E5").Value = Time
  End Sub
  </code></pre>
  
  <p>This then logs the last time the document was saved, I would like to know if there is any way I can remove cells D5 and E5 from the audit code, as these two cells along with D4 (which contains =TODAY() formula) will change often and will make my audit trail rather large.</p>
  
  <p>Any help would be most appreciated. </p>