Posted to microsoft.public.excel.programming
|
|
Automating the summing of columns
Thank you Chip
-----Original Message-----
Steve,
Try some code like the following. Repeat for columns C
and E.
Dim Rng As Range
Set Rng = Range("A1").End(xlDown)(2, 1)
Rng.Formula = "=SUM(A1:" & Rng(0, 1).Address(False,
False) & ")"
Rng.Font.Bold = True
Rng.Font.Underline = True
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Steve" wrote in
message
...
I have a spreadsheet which I send out each month. The
spreadsheet varies in length from one month to another.
Before I send it out, I sum the data in Columns A, C & E
and place the totals at the bottom of the corresponding
columns. Is it possible to get a macro to do this
bearing
in mind that there is likely to be a differing number of
rows each week. If so, is it possible to bold and
underline the totals also ?
Many thanks
.
|