Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Interpolation Visual Basic Macro!!!!

I have two columns of data (let's call them x and y). Now
I have a x-value in another cell somewhere in the range of
the x data and I want an interpolated y-value as an
output. Please help! I'm sure there is a visual basic
macro that can be written for this, but cannot figure out
how to do it. Could anyone please help?!?!? Thanks so much.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 837
Default Interpolation Visual Basic Macro!!!!

Agreed that more info is needed (type of interpolation, is data sorted,
etc.), but regression is not interpolation. Interpolation passes
through the data points; regression passes near them, but does not
necessarily pass through any data points.

Jerry

bruce taylor wrote:

There are certainly Worksheet Functions, but a lot depends
on the type of interpolation you want. It is twenty years
since I last worked on regression analysis but I suspect
you want a linear regression. Try the function Linest(,,,)

-----Original Message-----
I have two columns of data (let's call them x and y). Now
I have a x-value in another cell somewhere in the range

of

the x data and I want an interpolated y-value as an
output. Please help! I'm sure there is a visual basic
macro that can be written for this, but cannot figure out
how to do it. Could anyone please help?!?!? Thanks so

much.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Interpolation Visual Basic Macro!!!!

Sorry for the lack of info... To be more specific, I have
one column of temperatures in ascending order (i.e. 20-700
deg C, in increments of ~50 deg C) and another column(s)
of corresponding material data for each temperature point.
Now I want to output data for a specific temp that falls
w/i the data that I have... let's say for 48.5 deg C for
example. I only need a linear interpolation function or
macro. Can anyone please help me with this? Thanks so much
for your replys so far.
Leslie

-----Original Message-----
Agreed that more info is needed (type of interpolation,

is data sorted,
etc.), but regression is not interpolation.

Interpolation passes
through the data points; regression passes near them, but

does not
necessarily pass through any data points.

Jerry

bruce taylor wrote:

There are certainly Worksheet Functions, but a lot

depends
on the type of interpolation you want. It is twenty

years
since I last worked on regression analysis but I

suspect
you want a linear regression. Try the function Linest

(,,,)

-----Original Message-----
I have two columns of data (let's call them x and y).

Now
I have a x-value in another cell somewhere in the range

of

the x data and I want an interpolated y-value as an
output. Please help! I'm sure there is a visual basic
macro that can be written for this, but cannot figure

out
how to do it. Could anyone please help?!?!? Thanks so

much.


.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 837
Default Interpolation Visual Basic Macro!!!!

For concreteness, I will assume that the temperatures are in A1:A15, the
material data are in B1:B15, and that D2 contains the specific
temperature for which you want to interpolate a value.

=FORECAST(D2,OFFSET($B$1:$B$15,MATCH(D2,$A$1:$A$15 )-1,0,2),OFFSET($A$1:$A$15,MATCH(D2,$A$1:$A$15)-1,0,2))

should do the trick. It depends critically on the temperatures being in
ascending order, and there being no blank cells in either the
temperature or the material data ranges.

Jerry

L. Tucker wrote:

Sorry for the lack of info... To be more specific, I have
one column of temperatures in ascending order (i.e. 20-700
deg C, in increments of ~50 deg C) and another column(s)
of corresponding material data for each temperature point.
Now I want to output data for a specific temp that falls
w/i the data that I have... let's say for 48.5 deg C for
example. I only need a linear interpolation function or
macro. Can anyone please help me with this? Thanks so much
for your replys so far.
Leslie


-----Original Message-----
Agreed that more info is needed (type of interpolation,

is data sorted,

etc.), but regression is not interpolation.

Interpolation passes

through the data points; regression passes near them, but

does not

necessarily pass through any data points.

Jerry

bruce taylor wrote:


There are certainly Worksheet Functions, but a lot

depends

on the type of interpolation you want. It is twenty

years

since I last worked on regression analysis but I

suspect

you want a linear regression. Try the function Linest

(,,,)

-----Original Message-----
I have two columns of data (let's call them x and y).

Now

I have a x-value in another cell somewhere in the range


of


the x data and I want an interpolated y-value as an
output. Please help! I'm sure there is a visual basic
macro that can be written for this, but cannot figure

out

how to do it. Could anyone please help?!?!? Thanks so


much.

.



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
Visual Basic Autoshapes Macro Dav Excel Discussion (Misc queries) 2 December 14th 05 05:33 PM
MS Visual Basic Error...from MAcro G118 Excel Discussion (Misc queries) 0 December 12th 05 05:56 PM
Visual Basic Macro negzel Excel Discussion (Misc queries) 1 December 28th 04 10:53 PM
visual basic macro in excel Patrick Molloy[_9_] Excel Programming 0 July 23rd 03 09:12 AM
visual basic macro in excel Patrick Molloy Excel Programming 0 July 23rd 03 07:49 AM


All times are GMT +1. The time now is 12:17 PM.

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

About Us

"It's about Microsoft Excel"