I'm using VBA to enter the formula below after assigning cell addresses to the variables, and I've already confirmed that the variables have the cell addresses before the line below attempts to enter the formula, but I'm receiving the following error:

Run-time error '1004'

Application-defined or object-defined error

Here is the code:
Please Login or Register  to view this content.
The variables were set up as String


How can I get the correlation formula to work using these variables? Thanks!!