Thread: sum
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Anna Anna is offline
external usenet poster
 
Posts: 132
Default sum

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?



"Anna" wrote:

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)"