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

Can you give an example of what you have, and what is supposed to
be found and anything that is needed for a solution. If we find it hard to
understand what is wanted, it certainly would be pointless to try to start
programming. Not knowing what you are getting into is still a bit different
than having no idea of what is wanted.
---
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 ...
What if cell A$2 is a variable? how would you write it then? in other words
I don't now where the cell that will contai the formula will exist. So i
need to loop through looking for my mark...then when I see it I have to sum
up all the cells above it...and again the number of cells above it is unknown
as well ( i can see how I could use the offset property)

thanks



"David McRitchie" wrote:

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