View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bernd Plumhoff[_3_] Bernd Plumhoff[_3_] is offline
external usenet poster
 
Posts: 6
Default FIND method doesn't work in UDF. What's wrong with this code?

Hi Herman,

You can set a breakpoint at that line (left mouse-click in the editor to the
left of that line, one or more bordeaux-red dots will appear) and you can add
watches for interesting values (for example for SAR and for CRIT: right
mouse-click at CRIT and again at SAR and add a watch for them). Then start
the calculation. The macro will be interrupted at the breakpoint and you can
see the watched values at this state.

By the way: Your macro has no problem in my example (A1:A8 filled with
a,b,c,...,h; cell C4 filled with h, C5 = getrownumber(A1:A8,C4) returns 8
which is ok.

My statement below "--" just shows my general opinion not to use the OFFSET
worksheet function. Does not apply to your problem.

Regards,
Bernd