View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Using known arrays to calculate an array of new values

That should read "I have NOT tested much...

NickHK

"NickHK" wrote in message
...
Brett,
If I understand you correctly, the code below should work.
If you need a different method than linear to get the projected final
quantity, you'll need to change that part.
I have tested much, so ther may be some error(s), but this should get you
started.

NickHK
P.S. Not sure if this should be called "NormaliseArray", but you know what

I
mean.

Private Sub CommandButton1_Click()
Dim RetVal As Variant
Dim OutputArray As Variant

Dim Data(1 To 4, 1 To 2) As Variant

'Sample data
Data(1, 1) = "10:00"
Data(1, 2) = 1
Data(2, 1) = "10:08"
Data(2, 2) = 1.5
Data(3, 1) = "10:16"
Data(3, 2) = 2
Data(4, 1) = "10:33"
Data(4, 2) = 2.5
------------------- CUT ----------