sum

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Running below code get formula of =SUM('b9':B26)
Is there anyone tell me how can I get rid of '' from b9 by amend the below
coding?

ActiveCell.FormulaR1C1 = "=SUM(b9:R[-1]C)"
 
ActiveCell.FormulaR1C1 = "=SUM(R9C2:R[-1]C)"

Don't mix R1C1 and A1 style addressing. In this case, because you use
formulaR1C1, use pure R1C1 style.
 
It is easy to sum a range of cells by using shortcut button. If the
activecell is a100, I select the shortcut button. The sum Formula would be
a32..a99.
If b32 and a99 are variable not fixed cell, How do I write the formula at vba?
 

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