From B80 to B197, they are non-zero values.
Thanks
From B80 to B197, they are non-zero values.
Thanks
Check the file you uploaded; it only has data to row 565, and it's all zero.
Entia non sunt multiplicanda sine necessitate
Hi Shg,
Please see the attached image file from the data uploaded.
Regards,
Suggest you download the file you uploaded and look at it.
In the attachement . .
Autofiltering column-B for values greater than zero, shows B80:B197 to contains values greater than zero.
Weird.
Add this function to the workbook.
In C2 and copy down,![]()
Private Sub dFrac(d As Double, r As Range, _ ByRef i As Long, ByRef dF As Double, _ iMatchType As Long) ' shg 1997-0606, 2009-0419 ' 2009-0604 added option for descending sort ' Returns an index to r in i and an interpolation fraction in dF ' r must be a 2+ element vector sorted a-/de-scending if iMatchType=1/-1 If iMatchType = 1 And d <= r(1).Value2 Or _ iMatchType = -1 And d >= r(1).Value2 Then i = 1 Else i = WorksheetFunction.Match(d, r.Value2, iMatchType) If i = r.Count Then i = r.Count - 1 End If dF = (d - r(i).Value2) / (r(i + 1).Value2 - r(i).Value2) End Sub Function LINTERP(x As Double, rX As Range, rY As Range) As Variant ' shg 1997-0606, 2009-0419 ' 2009-0604 added option for descending sort ' Linear interpolator / extrapolator ' Interpolates rX to return the value of y corresponding to the given x ' rX and rY must be equal-length vectors ' rX must be sorted ascending or decreasing Dim i As Long ' index to rY Dim dF As Double ' interpolation fraction Dim v As Variant ' for each/loop control variable For Each v In Array(rX, rY) If v.Areas.Count > 1 Then GoTo Oops If v.Rows.Count <> 1 And v.Columns.Count <> 1 Then GoTo Oops If WorksheetFunction.Count(v) <> v.Count Then GoTo Oops Next v If rX.Count < 2 Then GoTo Oops If rX.Count <> rY.Count Then GoTo Oops dFrac x, rX, i, dF, IIf(rX(rX.Count).Value2 > rX(1).Value2, 1, -1) LINTERP = rY(i).Value2 * (1 - dF) + rY(i + 1).Value2 * dF Exit Function Oops: LINTERP = CVErr(xlErrValue) End Function
=LINTERP(A3,$D$3:$D$337,$E$3:$E$337)
... then plot columns B & C
Hi Shg,
It works very well..
Thank you very much..
Regards,
Minki
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks