View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
isabelle isabelle is offline
external usenet poster
 
Posts: 587
Default Using Regression Function in VBA Macro

hi,

the Regression tool uses the worksheet function LINEST

http://office.microsoft.com/en-us/ex...010342762.aspx

http://office.microsoft.com/en-us/ex...005209155.aspx

x = Application.LinEst(Range("A2:A5"), Range("B2:B5"), False)

isabelle

Le 2014-05-27 02:58, Shreyans Jain a écrit :
Hi,

I wanted to use the regression functionality of Excel in a VBA code to
use it on specific data which has more than one independent variables
entered by the user but I haven't been able to find the correct syntax
to be used to call the function. I know it is something related to
"ATPVBAEN.XLAM!Regress" or something but if somebody could give me the
correct syntax with all the options like plot, etc then that would be
really helpful.

I specifically need to make a VBA project out of it so using the addin
manually is of no use to me, I wish to call the functionality from my
VBA code to make it automatic for the user. Please let me know the exact
syntax of this function.