title: autosum from multiple worksheets
body: <p>I currently have a workbook with multiple worksheets, including a master worksheet. My current VBA provides a sum total for specified columns in the master worksheet and this works perfectly well.</p>
  
  <p>However, I would like to edit the VBA so I can have sum values for columns on different worksheets too. I have attached the code for reference below, if anyone can suggest how I might edit it in order to include more than one worksheet would be greatly appreciated. </p>
  
  <pre><code>`Sub AutoSum()
  Sheets("MASTER ACCOUNT REVENUE").Select
  Range("D4").Select
  Range("F4").Select
  Selection.End(xlDown).Select
  ActiveCell.Offset(2, 0).Select
  Dim cel1 As String, cel2 As String
  cel1 = ActiveCell.Offset(-2, 0).End(xlUp).Address
  cel2 = ActiveCell.Offset(-1).Address
  ActiveCell.Value = "=sum(" &amp; (cel1) &amp; ":" &amp; (cel2) &amp; ")"
  End Sub` 
  </code></pre>