Hello All,
The problem I would like solved is the following:
There are two sets of data...one in sheet1 and one in sheet2. Sheet1 is composed of X1 and Y1 data, where Y1 is directly related to X1(there is a lot of other data as well so this macro would have to find a specified column in Sheet1). Sheet2 is composed of just X2 data from a different experiment (again lots of other data so the location would have to be specified). The program should take the X2 data find the closest X1 value in Sheet1 and then interpolate the Y2 corresponding to the X2 value. The function Y(X) is not linear but there are thousands of data points so liner interpolation should suffice. So if you take a look at the example, the program should take the itotal value (X2) from sheet2 and look in Sheet1 itotal values (X1)and find the closest ones. Then interpolate from the Y1 values the corresponding Y2 values and paste it next to the X2 value.
Additional info....there are 30 X2 values per experiment....10 experiments. Obviously if there are 10 experiments there will be 10 "Sheet2s" and 10 "Sheet1s." Sheet1s will always be right before their Sheet2s. I can not upload my actual spreadsheets as it contains sensitive information but if you need to know the location of the Sheet1 X and Y Columns they start at I75 and H75 and end at I2141 and H2141,respectively....Sheet2 X and Y columns start at H66 and J66 and end at H95 and J95 respectively. Any other ideas or suggestions are welcome.
-TTU
Bookmarks