N
NEWBIE
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?
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?