Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Automating the summing of columns

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Automating the summing of columns

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default 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



.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Summing across columns while skipping some columns JAG Excel Worksheet Functions 2 February 28th 10 02:58 PM
Copying columns and automating data updates across worksheets jkl Excel Discussion (Misc queries) 3 February 13th 07 07:04 PM
Automating a series of dates for two columns? valholler Excel Worksheet Functions 0 September 28th 06 09:17 PM
summing columns thedarkman Excel Worksheet Functions 1 January 2nd 06 07:42 PM
Summing columns scottwilsonx[_28_] Excel Programming 4 August 25th 04 02:39 PM


All times are GMT +1. The time now is 12:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"