LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Averaging in VB

i'm writing a VB macro for excel and have run into a
problem: i have stored the addresses of cells into a
variable. i now would like to take the average of these
addresses using the variable onto a different Sheet. the
reason is that the number of rows and columns are supposed
to be arbitrary. here is an example of what i'm talking about:

Sheets("sheet2").select
temp = Range("B2", Range("B2","B2").End(xlDown)).Address
Range("A1").Select
' this next line is the problem
ActiveCell.Formula = "=AVERAGE(temp)"

for some reason excel wont let me take the average of
addresses stored in vatiables. any ideas?
 
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
Averaging with IFs John Excel Worksheet Functions 2 February 4th 10 05:08 PM
Averaging Hookette Excel Worksheet Functions 6 August 26th 09 07:28 PM
Averaging Kip New Users to Excel 1 February 22nd 08 12:59 AM
Averaging Kip Excel Discussion (Misc queries) 1 February 22nd 08 12:09 AM
Averaging best 15 out of 20? Rando Excel Discussion (Misc queries) 2 December 13th 05 10:01 PM


All times are GMT +1. The time now is 08:00 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"