function fred
Dim ws As Worksheet
Dim v
Set ws = Worksheets("outfile")
set v = ws.Cells.Find(18709)
If v Is Nothing Then Debug.Print "nothing"
if not v is nothing then debug.print v.address
exit function
The same code works (finds any value) when pasted into the debug window. But when called as an expression from a spread sheet, it fails, finding nothing.
Any suggestions?