Function GETMAXNUMBTWN(rCells As Range, MinNum, MaxNum)
Dim rRange As Range
Dim vMax
Dim aryNums()
Dim i As Integer
ReDim aryNums(rCells.Count)
For Each rRange In rCells
vMax = rRange
Select Case vMax
Case MinNum + 0.01 To MaxNum - 0.01
aryNums(i) = vMax
i = i + 1
Case Else
GETMAXNUMBTWN = 0
End Select
Next rRange
GETMAXNUMBTWN = WorksheetFunction.Max(aryNums)
End Function