Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Diederik
 
Posts: n/a
Default

"rae820" wrote:


There is a way...if you go to insert--function, the category dropdown
box and look at statistical. then you get all sorts of functions you
are looking for...
=average(c1:c23)
=stdev(c1:c23)... for example


--
rae820
------------------------------------------------------------------------


It is too many clicks away before I get the function. I have now found a vb
workaround that des the trick for me. The code is as follows:

Sub VariableAverage()

Dim strFrom As String
Dim strTo As String

strFrom = ActiveCell.Offset(-1, 0).Row
If strFrom = "" Then Exit Sub
strTo = ActiveCell.Offset(-1, 0).End(xlUp).Row
If strTo = "" Then Exit Sub

ActiveCell.FormulaR1C1 = "=average(R" & strFrom & "C:R" & strTo & "C)"

End Sub


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
Using The Average Function if a cell has NA carl Excel Worksheet Functions 6 May 21st 23 07:46 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Restore the auto save function, it was a life saver. JJB Excel Discussion (Misc queries) 1 May 20th 05 01:25 PM
average function in Excel 2002 Sherry New Users to Excel 13 May 8th 05 01:49 PM
I want to use the MATCH function with the AVERAGE function but I . Miguel Excel Worksheet Functions 2 April 23rd 05 05:29 PM


All times are GMT +1. The time now is 04:28 AM.

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

About Us

"It's about Microsoft Excel"