#1   Report Post  
Posted to microsoft.public.excel.misc
ashw1984
 
Posts: n/a
Default averages

in vba
hi how do i make a formula to give me the average of a strip of data
say a6 until the last piece of data in colomn a
and then
in msg boxs
1)tell me the average
2) the highest value
3) tell me the number of instances
4) how many of these are above a certain number and this as a percentage
please could these numbers also be accesable in the code for storage in the
sheet
thanks guys
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default averages

I'll give you formulae that can return those numbers, but a MsgBox requires
VBA.

1) A simple avearge does that as it ignores blanks =AVERAGE(A6:A2000)

2) =MAX(A6:A2000)

3) =COUNTA(A6:A2000)

4) =COUNTIF(A6:A2000,"10")

just adapt the range to suit.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"ashw1984" wrote in message
...
in vba
hi how do i make a formula to give me the average of a strip of data
say a6 until the last piece of data in colomn a
and then
in msg boxs
1)tell me the average
2) the highest value
3) tell me the number of instances
4) how many of these are above a certain number and this as a percentage
please could these numbers also be accesable in the code for storage in

the
sheet
thanks guys



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
averages in pivot tables emcnaughton Excel Discussion (Misc queries) 1 January 6th 06 07:14 PM
Function for generating monthly & weekly averages picklet222 Excel Worksheet Functions 4 December 8th 05 09:00 PM
Trouble Sorting Averages of Randomly Generated Numbers GStrawley Excel Discussion (Misc queries) 3 September 5th 05 10:39 PM
calculating averages Golf Averages Excel Discussion (Misc queries) 1 August 15th 05 08:25 PM
how to use the Prob function in a list of averages to find the le josephWard6 Excel Worksheet Functions 2 June 19th 05 11:14 PM


All times are GMT +1. The time now is 11:37 PM.

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"