View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Stevens Ed Stevens is offline
external usenet poster
 
Posts: 1
Default setting formula property

I could have sworn I asked this hear a year or so ago (and that's
about as often as I have to write some Excel macros), but a search of
the archives didn't turn it up. I'm also not able to find what I'm
looking for on MSDN, though I'm sure it can be done.

Need is to set a column total into a range of cells. This pseudo code
demonstrates what I'm after

for x = var1 to var2
myWorksheet.cells(row_num1, x).formula =
"sum((row_num2,x):(row_num3,x))"

next


basic point is I need the loop to step me from column to column, and
set up a sum of some rows in that column, but I won't know the column
by its letter name.