View Single Post
  #2   Report Post  
David McRitchie
 
Posts: n/a
Default

Do you work for an intelligence agency, that we've never heard of
because you are very skimpy on any details of what you want.

Maybe if I just look at the last sentence, I could interpret that as
how to add up all the cells above a cell the current column starting from
row 2.

A36: =SUM(A$2:OFFSET(A36,-1,0)

More on use of offset in
http://www.mvps.org/dmcritchie/excel/offset.htm

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"dstiefe" wrote in message ...
I am trying to insert (through VBA) a formula in certain cells.

the cells in which the formula will go in will vary (i.e. it's a variable)

and the number of cells (directly above it) that it adds up is also a
variable.

how would I do this?

Thanks