Thread: UDF help
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default UDF help

in a UDF

Dim rng as Range
set rng = Applition.Caller

will set rng to the cell containing the UDF

--
Regards,
Tom Ogilvy

"Salman" wrote in message
...
I need to use the address of a cell where I enter a UDF in
the UDF itself. How can I do that?

So the UDF code would say something like:

take column number of cell where function is entered
return the number of columns between function and column D

Thanks.