LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default write values to WorksheetFunction.Linest

I'm writing variant arrays to Linest with the code below
I'm taking a convoluted route by converting the array elapsedTime()
to a Variant Array 'Xs' via a range 'DeltaT'
I would prefer to use elapsedTime() more directly in Linest?
Any advice will be appreciated

Dim DeltaT as Range, DateTime as Range
Dim elapsedTime(1 to 5), i as Integer
Dim Xs as variant, Ys as Variant, output as variant
Set DateTime = Range("myrng") ' 5 x 1 range
For i = 1 To 5
elapsedTime(i) = DateTime(i) - DateTime(1)
DeltaT(i) = elapsedTime(i) ' populate temporary range
Next i
Ys = Range("myData").value
Xs = DeltaT.value ' transfer temporary range values to variant array
output = WorksheetFunction.LinEst(Ys, Xs, , 1)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
LINEST using only some of the values in an array Harlan Grove[_2_] Excel Worksheet Functions 0 May 23rd 07 07:19 PM
LINEST using only some of the values in an array Incoherent Excel Worksheet Functions 2 May 23rd 07 02:22 PM
LINEST using only some of the values in an array Lori Excel Worksheet Functions 0 May 23rd 07 01:30 PM
LINEST using only some of the values in an array Lori Excel Worksheet Functions 0 May 23rd 07 01:30 PM
LINEST using only some of the values in an array Lori Excel Worksheet Functions 0 May 23rd 07 01:29 PM


All times are GMT +1. The time now is 08:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"