View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
ashish128 ashish128 is offline
external usenet poster
 
Posts: 48
Default No Out put from UDF

On Nov 6, 3:10 pm, Ivyleaf wrote:
Hi,

Andy hit the nail right on the head with the Cell - rCell.

In addition, your variable for selecting the 'count' option is defined
in the function as "str_data_or_count", yet you refer to it later by
checking if "str_target = "c"". As a result, the count function won't
work for you. I would also suggest moving this test above the part
where you build the CSV string, otherwise you are wasting time in the
function by building a string that isn't used.

One other piece of advice would be that if you define your function as
a variant, then the count function could return the CSV string, or the
count as a number... I would assume that having the count as a number
would be far more useful if you are using that value anywhere else on
the sheet.

Cheers,
Ivan.


Thanks Ivan,

I have corrected the mistakes as told by you and will take care of it
going forward.

Regards

Ashish Sharma