View Single Post
  #5   Report Post  
Fredrik Wahlgren
 
Posts: n/a
Default


"Bill Martin -- (Remove NOSPAM from address)"
wrote in message ...
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


I thought of that but I figured that it could cause a circular reference.
I'm glad I could help.

/Fredrik