Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, all
I have a question on using average function in macro. I have couple of cells, for example from cells(3.4) to cells(3,55) and I want to get the averaged value of them. Is there a function I can directly use in macro? I found one object WorksheetFunction.Average(Range). How Can I convert Cells(3,4)~Cells(3,55) to a range value? Thanks, Suhao |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
... How Can I convert
Cells(3,4)~Cells(3,55) to a range value? Hi. One way: Sub Demo() Dim avr avr = WorksheetFunction.Average(Range(Cells(3, 4), Cells(3, 55))) End Sub -- HTH :) Dana DeLouis Windows XP & Office 2003 "Suhao He" wrote in message oups.com... Hi, all I have a question on using average function in macro. I have couple of cells, for example from cells(3.4) to cells(3,55) and I want to get the averaged value of them. Is there a function I can directly use in macro? I found one object WorksheetFunction.Average(Range). How Can I convert Cells(3,4)~Cells(3,55) to a range value? Thanks, Suhao |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Oh, man. This is simple.
Thanks! Dana DeLouis wrote: ... How Can I convert Cells(3,4)~Cells(3,55) to a range value? Hi. One way: Sub Demo() Dim avr avr = WorksheetFunction.Average(Range(Cells(3, 4), Cells(3, 55))) End Sub -- HTH :) Dana DeLouis Windows XP & Office 2003 "Suhao He" wrote in message oups.com... Hi, all I have a question on using average function in macro. I have couple of cells, for example from cells(3.4) to cells(3,55) and I want to get the averaged value of them. Is there a function I can directly use in macro? I found one object WorksheetFunction.Average(Range). How Can I convert Cells(3,4)~Cells(3,55) to a range value? Thanks, Suhao |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Average function question | Excel Worksheet Functions | |||
Average function question | Excel Worksheet Functions | |||
Error Handling #N/A with AVERAGE Function - Average of values in Row | Excel Worksheet Functions | |||
Average Question | Excel Programming | |||
Variable sized average macro/function | Excel Programming |