Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default linear interpolation macro help

say i have a table data

A B C D
1 9 15 5
2 12 19 18
3 15 22 30

when A = 1.5, it will interpolate the table array to get the corresponding B
C D values.

how do i write the macro??
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default linear interpolation macro help

Oligo,

Use the FORECAST function

Sub test()
Dim Str As String
Dim myVal As Double
myVal = 1.5

Str = "B: " & Application.Forecast(myVal, Range("B2:B4"), Range("A2:A4"))
Str = Str & Chr(10) & "C: " & Application.Forecast(myVal, Range("C2:C4"),
Range("A2:A4"))
Str = Str & Chr(10) & "D: " & Application.Forecast(myVal, Range("D2:D4"),
Range("A2:A4"))
MsgBox Str
End Sub

HTH,
Bernie
MS Excel MVP


"Oligo" wrote in message
...
say i have a table data

A B C D
1 9 15 5
2 12 19 18
3 15 22 30

when A = 1.5, it will interpolate the table array to get the corresponding
B
C D values.

how do i write the macro??


Reply
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
Linear Interpolation UDF Sloth Excel Discussion (Misc queries) 2 July 17th 07 04:02 PM
How to do a Linear interpolation in excel? Ines Excel Worksheet Functions 1 May 17th 07 07:10 PM
Matrix and linear interpolation [email protected] Excel Discussion (Misc queries) 1 October 25th 06 02:06 PM
Automating Linear Interpolation smurray444 Excel Discussion (Misc queries) 0 January 24th 06 04:25 PM
linear interpolation Taha Excel Discussion (Misc queries) 3 January 31st 05 02:12 PM


All times are GMT +1. The time now is 04:46 PM.

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"