LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Macro that counts rows and averages data in row

I have a Excel file that is imported in from another program as a CSV import.
What I want to do is create a macro that does many different things to
format the sheet to what we need. I can accomplish all, except the following:

I want to be able to have a line at the bottom that has a formula such as

=SUM(First row of data:Last Row of Data)/The number of rows of data

(The total number of rows could be anywhere from 200 to 2000.)

A small sample would be the following:

A B C D
1 Item1 $0.50 EACH 3.0
2 Item2 $1.50 CASE 1.5
3 Item3 $0.75 EACH 4.5
4 Item4 $2.00 EACH 0.75

Average of D: =SUM(D1:D4)/4

Thanks for any help!
 
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
average daily counts to weekly counts Dave Excel Discussion (Misc queries) 0 June 17th 08 06:24 PM
Pulling Multiple Totals, Averages, and Counts RJB Excel Discussion (Misc queries) 1 May 3rd 07 10:44 PM
counts rows in data Bryan Brassell Excel Programming 7 December 2nd 05 09:58 PM
Averages and Counts from different columns sonofroy Excel Worksheet Functions 21 May 6th 05 08:13 PM
macro that counts lines with certain color Philipp Oberleitner Excel Programming 2 June 15th 04 02:48 PM


All times are GMT +1. The time now is 08:03 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"