![]() ![]() What you used from an old spreadsheet was a custom function using VBA or a downloaded add-on (which is not necessarily native). I see that similar formula in an old spreadsheet but its disabled on my current computerĪs other have noted, no there's not a built-in interpolate function in Excel. =interpolate(range1,range2,value to lookup) If that don't work I'll try this.īut isn't there an excel function like the following? Thanks, I'm waiting for an ex coworker to send me a file so I can see exactly how I went about this in the past. ![]() The optional parameter isSorted defaults to true set it to false if the x values are not sorted. LinInterpolate = yBelow + (xVal - xBelow) * (yAbove - yBelow) / (xAbove - xBelow) YBelow = yRange.Cells(Low): yAbove = yRange.Cells(High) XBelow = xRange.Cells(Low): xAbove = xRange.Cells(High) If Abs(xVal - testVal) < Abs(xVal - xAbove) Then If Abs(xVal - testVal) <</a> Abs(xVal - xBelow) Then If (xRange.Cells(Med).Value) < (xVal) Then Code: Function LinInterpolate(xVal As Double, _ĭim High As Long, Med As Long, Low As Long
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |