View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Correlation of Variables

that's perfect! thanks! one more question, how would i do
this if the cells i selected in the beginning were from
lets say sheet1 and the ActiveCell in this example was on
sheet2? any ideas?


-----Original Message-----
Try something like

ActiveCell.Formula = "=CORREL(" & adrs & "," & adrs2 & ")"

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"NEWBIE" wrote in

message
...
i'm tring to take the correlation of two different groups
of cells that i store the addresses of in variables. the
problem is that i need to keep the ranges for an arbitrary
group of cells, which is why i use the variables. here's an
example :

adrs = Range(Sheets("Sheet2").cells(2,col),
Sheets("Sheet2").cells(2,col).end(xlDown)).Address

adrs2 = Range(Sheets("Sheet2").cells(2,col),
Sheets("Sheet2").cells(2,col).end(xlDown)).Address

Range("A1")Sselect
' this next line is where i have problems with the addresses
ActiveCell.Formula = "=CORREL( adrs, adrs2 )"


any ideas what to put in the CORREL command to get it to
take the correlation of the two groups of cells? thanks



.