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.
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.