Interpolation for merging data sets

dst112

New Member
Joined
Sep 2, 2010
Messages
4
Hi,

I've got two sets of X-Y data (let's say X1,Y1 and X2,Y2.) I would like to plot X1,(Y1-Y2). The only problem is that the two sets do not have common X values.

Currently, I use the following process:
- VLOOKUP function to fetch the X2 values above and below a given X1 value
- SLOPE function on those two X2,Y2 points to obtain the gradient
- Use one of the X2,Y2 points and the calculated gradient to obtain the contant
- Use the calculated gradient, constant and the X1 value to get an interpolated Y2 value corresponding to the X1 value.

This works fine for the moment, but I can't help but think it's very messy and non-general. Does anyone have any ideas to streamline/generalise this process?

Thanks.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,224,602
Messages
6,179,839
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top