View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
hal hal is offline
external usenet poster
 
Posts: 2
Default Whats wrong with this VBA statement -ActiveCell.FormulaR1C1...?

ActiveCell.FormulaR1C1 = "=SUM(R[-(Range("j1").Value)]C:R[-1]C)"

I am trying to put a formula in the active cell to sum a list of numbers starting from 1 row up, to the number of rows up that is equal to the value in the cell j1. In other word if the value in the cell j1 was 9, I need to sum from 1 row up to 9 rows up.

Thank you in advance for any help.