Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
Calculating Averages - Very Complex PLEASE HELP Hoov Excel Discussion (Misc queries) 7 January 28th 10 03:36 AM
calculating averages Golf Averages Excel Discussion (Misc queries) 1 August 15th 05 08:25 PM
calculating averages keving Excel Worksheet Functions 8 December 9th 04 01:23 AM
Calculating Averages in VBA... Jeff Harbin[_2_] Excel Programming 3 August 4th 04 01:30 AM
calculating averages Fidelis Excel Programming 4 August 22nd 03 08:37 PM


All times are GMT +1. The time now is 10:39 AM.

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"