Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A long time ago someone gave me this UDF which has been of great value to
me. Function myCell(Optional Cell) Application.Volatile If IsMissing(Cell) Then myCell = Application.Caller. _ Address(rowabsolute:=False, _ columnabsolute:=False) Else myCell = Cell. _ Address(rowabsolute:=False, _ columnabsolute:=False) End If End Function If I type for example: =mycell(K353) returns K353. If I type =mycell($K$353) it still returns K353. Question: What should the UDF look like if I want: =mycell(K353;1) should return K353 =mycell(K353;2) should return $K353 =mycell(K353;3) should return K$353 =mycell(K353;4) should return $K$353 Hans Knudsen |