Fredrik Wahlgren wrote:
Use Application.Volatile (True) like below:
Function FirstNumberOffset(TopCell)
Application.Volatile (True)
RowOffset = 0
While Not (IsNumeric(TopCell.Offset(RowOffset, 0)))
RowOffset = RowOffset + 1
Wend
FirstNumberOffset = RowOffset
End Function
/Fredrik
----------
You're right - that seems to fix it. It's much more elegant than the
solution that I stumbled upon which was to include a call parameter that
contains an entire range of cells so if any of them change, then Excel
knows to recalculate the function.
Thanks...
Bill
|