Function DRXL( A, B, Row) 'A and B are integers and row is the worksheet row number' Set Lows = Range("Lows") Set Highs = Range("Highs") Set TR = Range("TR") HH = 0 For n = A To B Value1 = (Highs.Cells(Row) - Lows.Cells(Row - n)) / Sqr(n) If Value1 > HH Then HH = Value1 End If Next DRXL = HH / Application.Average(Range(TR.Cells(Row), TR.Cells(Row - 20))) End Function Thanks, Peter Day
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)