title: run macro multiple sheets with exclusions
body: <p>I am trying to run this macro across multiple data sheets in my workbook but i cant get the code to run properly across the workbook.  If i run the macro on a single sheet it works fine but i am trying to run all sheets now and exclude "DATA" and "UPDATE" sheets and haven't had any luck the code is below if there are any suggestions as for how to run properly through all worksheets? Thanks</p>
  
  <pre><code>  Sub UpdatePrices()
    Dim ws As Worksheet, Ldate As String, DateRng As Range
    Set DateRng = Range("A3") 'date range is last date
       Ldate = DateRng.Value 'defines ldate as most recent date
  
      For Each ws In ActiveWorkbook.Worksheets
  
  'Inserts a new row with containing today's Date and exclude sheets
    If Ldate &lt;&gt; Date And ws.Name &lt;&gt; "DATA" Or ws.Name &lt;&gt; "UPDATE" Then
      DateRng.EntireRow.Insert
      DateRng.Offset(-1, 0) = "=TODAY()"
      Else 
      End If
      Next ws
      End sub
  </code></pre>