A non-volatile approach.
If you want to use that logic:
=MAX(A5:INDEX(A:A,6+B1))
Where B1 = your variable
Or, you could change this logic A(6+x) and instead use the actual row number
you're interested in:
So, if B1 = 4, then 6+B1 = 10
Instead, make B1 = 10
=MAX(A5:INDEX(A:A,B1))
Note that using this approach if B1 is empty the formula will return the max
from the entire column A.
--
Biff
Microsoft Excel MVP