Hi,
I have an interpolation function that I have tried to write in VBA. The results of the function are correct when the given X value (in my case sigma) is equal to or outside the bounds of the highest or lowest sigma. But when the given X value or sigma for which I'm trying to interpolate is between the highest and lowest sigma I get incorrect results. I'm not sure where the code is wrong or why its giving incorrect results for this subset of scenario. I'd appreciate any insight. I have attached a sheet with sample data that also contains the VBA code under module1. I will also include the code below.
Thanks
examplesheet.xlsm
Please Login or Register to view this content.
Bookmarks