information functions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top