Excel Function : INTERCEPT
Category
Statistical
Description
Returns the intercept of the linear regression line
Microsoft Excel Reference Page
https://support.office.com/en-us/article/INTERCEPT-function-2a9b74e2-9d47-4772-b663-3bca70bf63ef
Syntax and Description of the INTERCEPT Excel Function
I'm trying to get the syntax for the INTERCEPT function in Excel using VBA but I can't seem to figure it out. I've tried
ActiveSheet.Shapes.AddFormula fmFormulaShape, "=INTERCEPT(A1:B5,A1:B5)", xlEdgeLeft, ylEdgeTop, _
Width, Height
but that gives me a syntax error. I've also tried
ActiveSheet.Shapes.AddFormula fmFormulaShape, "=INTERCEPT(A1:B5;A1:B5)", xlEdgeLeft, ylEdgeTop
About INTERCEPT Excel Function
INTERCEPT returns the y-coordinate intercept of a line using x-coordinates and y-coordinates.
Syntax: =INTERCEPT(known_y's, known_x's)