Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for x = var1 to var2
With myWorksheet .cells(row_num1, x).formula = _ "=sum(" .Range(.Cells(row_num2,x),.Cells(row_num3,x)) _ .Address(0,0) & ") End With next -- Regards, Tom Ogilvy Ed Stevens wrote in message om... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
unable to set the formula array property of the range class | Excel Worksheet Functions | |||
cancelling getpivot formula when setting formula outside pivot ta. | Excel Worksheet Functions | |||
Unable to set the formula property of the series class | Charts and Charting in Excel | |||
setting XValues property when charting using macros | Charts and Charting in Excel | |||
Error setting shape text property | Charts and Charting in Excel |