information functions

D

Demetri

Hi,

I want to get a worksheet name into a cell in the worksheet, such as
=cell("filename")
, but I want to keep the correct name for the correct worksheet.

If the above formula is used, every time the worksheet is recalculated the
value of the cell changes depending on the name of the worksheet that you are
in.

So, if the formula is in sheet aaa and you are working in sheet bbb and
recalculate, when you return to sheet aaa the name in the cell will be bbb
rather than aaa.

If you can help please do.

Thanks
 
T

T. Valko

Try this:

If you include the second argument that will keep the formula from doing
what you describe:

=CELL("filename",A1)

The cell reference can be *any* cell reference.

Try this version to get *only* the sheet name:

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

Biff

You can put the formula in any cell. The cell reference can be any cell
reference.
 
D

David Biddulph

If you use =cell("filename",A1) then it should refer to the current
worksheet, rather than (in the absence of the second argument) the last cell
changed.
 
Top