ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Summing columns (https://www.excelbanter.com/excel-programming/307964-summing-columns.html)

scottwilsonx[_28_]

Summing columns
 
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 summaris
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


Don Guillett[_4_]

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/




Paul B[_8_]

Summing columns
 
Scott, use this in row 600, or am I missing something?

=AVERAGE(C1:C599)
=AVERAGE(D1:D599)
=SUM(F1:F599)

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **

"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/




Paul B[_8_]

Summing columns
 
Missed it was in programming!
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **

"Paul B" wrote in message
...
Scott, use this in row 600, or am I missing something?

=AVERAGE(C1:C599)
=AVERAGE(D1:D599)
=SUM(F1:F599)

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **

"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/






Rodney POWELL

Follow-Up: Summing columns
 
Scott --


With worksheet formulas it's like this :

C600 : =AVERAGE(C1:C599)

D600 : =AVERAGE(D1:D599)

F600 : =SUM(F1:F599)


Using VBA -- here's the procedure :

Sub MyCalcs()

With Worksheets("MySheetName")
.Range("C600").Value = Application.Average(.Range("C1:C599"))
.Range("D600").Value = Application.Average(.Range("D1:D599"))
.Range("F600").Value = Application.Sum(.Range("F1:F599"))
End With

End Sub

-----

Hope it Helps,

- Rodney POWELL
Microsoft MVP - Excel

Beyond Technology
Spring, Texas USA
www.BeyondTechnology.com



"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/


All times are GMT +1. The time now is 08:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com