View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Q about making a function

Frederick,

You can use built-in functions, which automatically update

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,99)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Microsoft Forum" wrote in message
...
Hi all,

I have written a function which displays a current sheet name in a cell.

It
is very simple and it works fine.

However, I have a question. Suppose the function is called "SheetName" and
the current sheet is named "Sheet1".

I put "=SheetName()" in a cell and it properly display "Sheet1". However,

if
I change the sheet name, then the function won't automatically do the
update. Any way to do the automation? Thanks a lot.

Frederick Chow
Hong Kong.