View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jan Karel Pieterse Jan Karel Pieterse is offline
external usenet poster
 
Posts: 535
Default How to refer to the cell containing the formula?

Hi Faraz,

Sometimes, I usually end up in a problem while creating UDFs which refer to
the cell actually containing the same. I usually use ActiveCell technique but
in a loop in a sub procedure its OK while when used in a UDF the ActiveCell
is always different where the cursor is place.


Application.Caller returns the range which called the UDF.

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com