title: Excel VBA to add weekly sheet?
body: <p><strong>The Scenario:</strong> I have an Excel sheet which has an (automatically generating) list of dates (every day in the month, except for weekends). </p>
  
  <p>Those dates are in cells <code>A2:A32</code> and in cells <code>B2:B32</code> and <code>C2:32</code> there are some extra details (which aren't really important).</p>
  
  <p>I also have a Macro that activates when I click a command button. The Macro uses those dates to create a new sheet for each date. </p>
  
  <p><strong>The Macro:</strong></p>
  
   
  
  <pre class="lang-vb prettyprint-override"><code>Private Sub CommandButton2_Click()
  Dim rng As Range
  Set rng = Sheets("Sheet1").Range("A2:A32")
  Dim wks As Worksheet
  For Each cell In rng
      On Error Resume Next
      If cell.Value &lt;&gt; "" Then
          Set wks = Sheets.Add(After:=Worksheets(Worksheets.Count), Type:="C:\Users\User1\Desktop\1.xltx")
          wks.Name = cell.Value
          wks.Range("B2").Value = cell.Offset(0, 1).Value
          wks.Range("B3").Value = cell.Offset(0, 2).Value
      End If
  Next cell
  End Sub
  </code></pre>
  
  <p><strong>The Question:</strong> How do I change the macro so that after every Friday, the macro makes a sheet with a weekly total (that uses another template and is named (if possible) week1, week2, etc). </p>
  
  <p>If it helps, cell B3 has the day of the week written in text (Friday, Monday... etc).</p>