View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jack Sons Jack Sons is offline
external usenet poster
 
Posts: 144
Default ActiveCell.FormulaR1C1 = "=SUM(R[-tellerteller]C:R[-1]C)"

Hi all,

I have thes lines of code:

Range(Cells(tellerteller + 2, "Q"), Cells(tellerteller + 2, "Q")).Select
ActiveCell.FormulaR1C1 = "=SUM(R[-tellerteller]C:R[-1]C)"

In this case at that stage tellerteller = 9
So I want in Q11 the sum in column Q from Q2 (Q1 is the header) up to Q10,
this gives an error.

1. What is wrong and how should the code be?
2. Is there no sum function in VBA, I mean sum over a range?

Jack Sons
The Netherlands