View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Prof Wonmug Prof Wonmug is offline
external usenet poster
 
Posts: 61
Default VBA: How to match two sets?

On Tue, 20 Apr 2010 23:50:10 -0400, "Rick Rothstein"
wrote:

I'm a little confused at what you are attempting to do. I think what is
confusing me is your debug string is shown as being optional... if you were
to leave it out, exactly what is your function going to do? Can you post a
clear example showing your initial condition, what you want to do with it
and what value you want your function to return?


Sorry for the multiple posts. I think I just realized what the
confusion is.

The UDF already exists, but was returning funny results from some
cells in some conditions. I was looking for some code I could add to
the UDF for debugging purposes and then remove when it's working.

If the UDF already has this syntax

=MyUDF(p1,p2,p3)

then I would add an optional 4th argument

=MyUDF(p1,p2,p3,"B")

which would make the debug code active from just that cell without
affecting any of the other calls. I could even make the argument
conditional.

=MyUDF(p1,p2,p3,IF(A+B,"M",""))

Does that clear it up?