Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Visual Basic Autoshapes Macro | Excel Discussion (Misc queries) | |||
MS Visual Basic Error...from MAcro | Excel Discussion (Misc queries) | |||
Visual Basic Macro | Excel Discussion (Misc queries) | |||
visual basic macro in excel | Excel Programming | |||
visual basic macro in excel | Excel Programming |