View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Virginia Morris Virginia Morris is offline
external usenet poster
 
Posts: 7
Default Finding cells and summing variable cells

Chris -

You need to set a variable value equal to the row property of the cell
containing the value "Grand Total". I don't know what method you're using
to locate that cell, but once you have it, you can say something like this:

totalRow = [cell containing "Grand Total"].row

& then use the totalRow variable whenever you need that row number.

I'm afraid that I'm not sure exactly what your second question is asking.
Do you just want the number representing the sum or do you want the sum
formula entered into your spreadsheet? Or something else?

Good luck!
"Chris M." wrote in message
...
OK, I have a twofold problem.

First, I scan down the A column for the value "Grand
Total". I need to somehow store the row value for recall
in later code, but am not sure how to do this, or how to
recall it. For instance, I'd like to make my code run
within certain cells in columns E, G, and I and the row
that "Grand Total" is on.

Secondly, I need to total every "=Sum" field above the
specified cell, but can't even begin to fathom how to
accomplish this.

Help is greatly appreciated.