title: Use VBA to sum several cells above active cell
body: <p>I need to use VBA to set a cell to sum several cells above the active cell. I have played around with some code that I came across but it is set to pull the entire column above the active cell. I do not understand the code enough to modify it to sum the cells two and three rows above. Here is what I have so far (only a portion of the macro posted):</p>
  
  <pre><code>Sub QRTLYdatagrab()
  
  ''''Script leading up to this point has been omitted''''
  
  Range("U1").End(xlDown).Offset(1, 0).Select
  ActiveCell.FormulaR1C1 = "SUM('Asset_Dtl for CEQs for FAS 157'!J:J)"
  Range("U1").End(xlDown).Offset(2, 0).Select
  
  Dim r As Range, rAbove As Range
  Dim wf As WorksheetFunction
  Set wf = Application.WorksheetFunction
  Set r = ActiveCell
  Set rAbove = Range(r.Offset(-2, 0), Cells(2, r.Column))
  r.Formula = "=SUM(" &amp; rAbove.Address &amp; ")"
  
  ''''Script after this point has been omitted''''
  
  End Sub
  </code></pre>
  
  <p>A quick example: one quarter my data may utilize 402 rows. I have summed rows 1 - 402 in 403. 404 is pulling a sum from another tab. I need 406 to sum 403 and 404. Please let me know if I need to clarify anything and thank you in advance for any help. </p>