Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't understand. You can use VBA code to populate the cells with a formula.
You could even convert the results of the formula to values. But if you want: Option Explicit Sub Testme() Dim Xs As Variant Dim Ys As Variant Dim res As Variant Dim HowManyRows As Long Dim HowManyCols As Long Dim DestCell As Range With ActiveSheet 'test data and the topleftcell of the result range. Xs = .Range("b1:b10").Value Ys = .Range("a1:a10").Value Set DestCell = .Range("f9") End With res = Application.LinEst(Xs, Ys, , True) HowManyRows = UBound(res, 1) - LBound(res, 1) + 1 HowManyCols = UBound(res, 2) - LBound(res, 2) + 1 DestCell.Resize(HowManyRows, HowManyCols).Value = res End Sub Fei wrote: Thanks Dave. VBA code is preferred, as I run regressions for different worksheets... -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
My excel spreadsheet won't print or print preview all the pages? | Excel Worksheet Functions | |||
how to use linest to get the result as ARRAY? | Excel Worksheet Functions | |||
r2 result in LINEST Excel 97 v Excel 2003 | Excel Discussion (Misc queries) | |||
How do I extract a single value from the linest array result? | Excel Worksheet Functions | |||
One spreadsheet cell won't print but shows up in print preview? | Excel Discussion (Misc queries) |