Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It took a while but was able to piece other pieces of code together to get to
it. Here it is......i'm sure just one of many possible solutions Sub average() Dim i As Long Dim j As Long Dim start As Long i = ActiveCell.Row - 1 start = i j = ActiveCell.Column If Cells(i, j).Value = "" Then Exit Sub End If Do While Cells(i, j).Value < "" i = i - 1 Loop i = i + 1 Selection.Formula = "=average(" & Cells(i, j).Address & ":" & Cells(start, j).Address & ")" End Sub "Matt R" wrote: Hi, Need the syntax to calculate the average of a range of cells and it will know where to stop the range when it finds a blank cell. Selection.Formula.....etc... (e.g. Just how the Sum (Sigma) function works already) Thanks for your help Matt R |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Making random and unique selections from a list | Excel Discussion (Misc queries) | |||
Random selections | Excel Worksheet Functions | |||
Non-random numbers generated by excel's data analysis random gener | Excel Worksheet Functions | |||
Random range averaging | Excel Programming | |||
Non-random numbers generated by excel's data analysis random gener | Excel Discussion (Misc queries) |