Advertisement
hectic101

Running Sum

Apr 12th, 2015
2,138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub Running Sum()
  2.    
  3.     Dim row As Double
  4.     Dim col as Double
  5.     Dim sum as Double
  6.  
  7.     row = 2
  8.     col = 1
  9.     sum = 0
  10.  
  11.     While ActiveSheet.Cells(row, col) <> ""
  12.         sum = sum + ActiveSheet.Cells(row,col)
  13.         ActiveSheet.Cells(row,col+1) = sum
  14.     Wend
  15.  
  16. End sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement