>How can I get a column total for columns 3 - 12 in a spreadsheet through automation. The number of rows is variable for each spreadsheet, however the columns are constant.
>
>I suppose I can calulate the totals and append a record to the table and then the totals will appear as the last entry when I add them to the worksheet. However I was looking for an automation type code.
>
>
>Any help appreciated
>Thanks
>Gaylen Jungling
Save a macro in Excel to insert the total, and look at it. You will get something like Selection.FormulaR1C1 = "=..." in some place is the number of rows, which will be variable - change that to
"..." + trans(lnRowCount) + "..."
, assuming you saved the row count to that variable.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)