Thread: Summing columns
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Summing columns

try this
Sub averageandsum()
x = Cells(Rows.Count, "c").End(xlUp).Row
Cells(x + 2, "c") = Application.Average(Range("c2:c" & x))
Cells(x + 2, "d") = Application.Average(Range("d2:d" & x))
Cells(x + 2, "f") = Application.Sum(Range("f2:f" & x))
End Sub
--
Don Guillett
SalesAid Software

"scottwilsonx " wrote in
message ...
Hi.

Could someone tell me how to tackle the following.
I have a worksheet with data as follows:

Column C and Column D and Column F have data which I want to summarise
at the bottom of the spreadsheet, say line 600.

Column C - I want to calculate the average value
Column D - I want to calculate the average value
Column F - I want to sum all the values

Can this be done?

Many thanks for your help.
Scott.


---
Message posted from
http://www.ExcelForum.com/