Multiple Linear Interpolations on a Dynamic Range

HideAndSeekChampion

New Member
Joined
May 27, 2011
Messages
1
Hello all,

I have a VBA problem that I hope (and given the quality of some of the posts I have read, am quite sure) is solvable.

I need to perform a linear interpolation using a 3 column range of cells, where the first column is an identifier for different data sets (see example below).

The process needs to be dynamic, so that the number of data sets (each group of ID's) can change each time the VBA is run, and the end result is to be a table as described in the example below, containing interpolated Y values for a standard 1D array of X values.

E.G.

Input/Starting point:

ID, X, Y
A, 1, 10
A, 3, 30
A, 4, 40
B, 1, 10
B, 2, 20
B, 3, 30


Result (Standardised range of x values along the top, ID's down the left)
1, 2, 3, 4
A 10,20,30,40
B 10,20,30,40


I have VBA function to perform the Linear Interpolations for a given range of X's and Y's, and a desired X, however this is not automated nor dynamic (would need to manually adjust formulas, and create table each time).

Any advice would be greatly appreciated. If further information is required, please le me know.

Cheers.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,223,248
Messages
6,171,011
Members
452,374
Latest member
keccles

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