Janet,
You can do this with a custom function. Copy the following function to a module sheet within the workbook:
Function SheetName()
SheetName = ActiveSheet.Name
End Function
You then can type the following formula in any cell on the sheet.
=SheetName()
This recalcs like any other formula would.
HTH
Chris
Gary,
There is indeed a simple way to get the filename into a cell:
the formula is: =cell("filename";a1)
excuse for sending it in 2 parts
I'm trying to put the worksheet name in a cell to be used in a formula and the code above will not work for me. I'm using Excel 2000. Any ideas?
Thanks,
Brad
Chris
I am using 97 and whilst the function you specify works OK first time I find that it does not introduce changes automatically. Is there an alternative of making this function a global one (or something similar) rather than linking it to a specific sheet?
Regards
Gary
Try :-
=CELL("filename")
mads
PS. Rather than add messages to very old questions, you will be more likely to receive replies if you add a new question. I just happened to notice your message when looking for something else.