Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculating Averages
Hi, I'm working at calculating an average from a range of cells. The rang is in another excel file, and is selected from user inputs. This is what i have so far: Workbooks.Open Filename:=file_name Initial = "b" & w_row Final = "b" & counter range(Initial & ":" & Final).Select This is where I get stuck...do i need to store these values in an arra or is there a formula to calculate the average of range(Initial & ":" Final) Thanks in advance, Dan -- Dan ----------------------------------------------------------------------- Dani's Profile: http://www.excelforum.com/member.php...fo&userid=2354 View this thread: http://www.excelforum.com/showthread.php?threadid=37706 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculating Averages
Dim v as Double
Workbooks.Open Filename:=file_name Initial = "b" & w_row Final = "b" & counter v = Application.Average(range(Initial & ":" & Final).Value) msgbox v ' or cells(1,1).Value = v -- Regards, Tom Ogilvy "Dani" wrote in message ... Hi, I'm working at calculating an average from a range of cells. The range is in another excel file, and is selected from user inputs. This is what i have so far: Workbooks.Open Filename:=file_name Initial = "b" & w_row Final = "b" & counter range(Initial & ":" & Final).Select This is where I get stuck...do i need to store these values in an array or is there a formula to calculate the average of range(Initial & ":" & Final) Thanks in advance, Dani -- Dani ------------------------------------------------------------------------ Dani's Profile: http://www.excelforum.com/member.php...o&userid=23542 View this thread: http://www.excelforum.com/showthread...hreadid=377068 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculating Averages - Very Complex PLEASE HELP | Excel Discussion (Misc queries) | |||
calculating averages | Excel Discussion (Misc queries) | |||
calculating averages | Excel Worksheet Functions | |||
Calculating Averages in VBA... | Excel Programming | |||
calculating averages | Excel Programming |