>Hi All,
>I have to create an Excel file from VFP based on existing original Excel book. The problem is that the existing one has a formula in one of the cells with the CORREL function. I could not find an equivalent to that in VFP. Before I dive into how to get the result by writing code for that, I would like to know is there any equivalent in VFP for this Excel function?
>Thanks in advance,
>Jonathan
No, VFP does not have many of the advanced statistical functions. But as you mentio correctly, Excel does. SO why not use tthe one in Excel itself?
I am not an expert in stats, but reading Excel help I see it is a correlation between two arrays.
CORREL(array1,array2)
The example in the book is
CORREL({3,2,4,5,6},{9,7,12,15,17})
So you can easily write your code to plug it into the formula (or formulaRC) of the cell in question, replacing the values with either cells, or your memvars/properties at the time you need it. That way Excel itself does the processing.
HTH