A family of Microsoft relational database management systems designed for ease of use.
That's awesome. I tried the Array() function and had no success. Glad to hear you got it working.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
If I enter the following within Access VBA I get the correct answer (18.307), so I'm set-up to use Excel functions in Access:
MsgBox Excel.Application.ChiInv(0.05, 10)
I'm trying to access Excel's LINEST statistical function from Access VBA. Every example I've seen uses Excel cell ranges (say A1:A21) whereas I'm trying to analyse data from an Access table.
How do I insert a data sequence into the LINEST function? At the simplest level, Excel will calculate that LINEST of 30, 32, 34 is 2.000. How can I enter those values in Access VBA, either as reference to a sequence of query values or as a code-created string?
Peter
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
That's awesome. I tried the Array() function and had no success. Glad to hear you got it working.
Tom
Thanks. I've played around with some work-arounds and found that if I (a) dimension an array (say Dim x()), (b) populate that array with values extracted from an Access table and then (c) use the array value in the Excel formula, it comes up with the answer: Excel.Application.LinEst(x)
Peter
You cannot, because you cannot enter cell references that are required by this function.
Linear regression is not that hard. Bing for "vba linear regression" and you will find several promising leads.
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more