Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Equivalent to Excel CORREL function
Message
From
15/10/2003 08:52:59
 
 
To
15/10/2003 06:51:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00838799
Message ID:
00838839
Views:
27
>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


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Reply
Map
View

Click here to load this message in the networking platform