formula question

  • Thread starter Thread starter JT
  • Start date Start date
J

JT

I would like to try summing all of the rows of data at the
end of the transactions. I tried the formula below but I
get an error.

The problem is that the last row will always be different,
so I want to set a variable to identify that row.

ActiveCell.FormulaR1C1 = "=SUM(R[lastrow1]C:R[-2]C)"

Any help would be greatly appreicated. Thanks
 
Hi
try:
ActiveCell.FormulaR1C1 = "=SUM(R[" & lastrow1 & "]C:R[-2]C)"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top