Hi,

I have some code that I need to figure out the sum of a dynamic range until it reaches a blank cell. Right now, I have the following:

Dim LR As Long
LR = Range("C13").End(xlDown).Row
MsgBox Application.WorksheetFunction.Sum(Range("C13:C" & LR))
However, I don't want the answer to be displayed in an message box. Instead, I would like to answer to appear in a particular cell in the worksheet that I named "sum_inputs"

I have the following code so far, but I'm not sure how to code in the formula on the 4th line (it is giving me a "compile error: end of statement expected" error):

Dim LR As Long
LR = Range("C13").End(xlDown).Row
Range("sum_inputs").Select
ActiveCell.Formula = "=Sum(Range("C13:C" & LR))"
Thanks.