Trying to run a VBA that will sum up a column that could be any number in length. So I need it to search for the first empty cell and put the sum there. I can only get it to work as follows:
Range("K4").Select
Selection.End(xlDown).Select
Range("K19").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=SUM(R[-15]C:R[-1]C)"
Range("K20").Select
So I am trying to sum up K4:last cell k20 happened to be the last cell in my current file. But want it to be able to work if there were more rows as well.
Please let me know if you have any ideas. Thanks in advance!
Range("K4").Select
Selection.End(xlDown).Select
Range("K19").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=SUM(R[-15]C:R[-1]C)"
Range("K20").Select
So I am trying to sum up K4:last cell k20 happened to be the last cell in my current file. But want it to be able to work if there were more rows as well.
Please let me know if you have any ideas. Thanks in advance!