How to get name of sheet

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hello,

I need to use the worksheets name in a calculation, but I found no way
to get the worksheets name. Does anyone has a glue how to obtain it.

Thanx

Peter

PS. Sorry for the empty posting, I sent before
 
Peter,

Try the following formula:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,99)

The workbook must have been saved for this formula to work
properly.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
This almost solves my problem, but not completely. This is because
this formula always evaluates to the currently opened sheet, but what
I need is the following: On each sheet I need the name of this sheet
itself. E.g. on sheet ONE the formula must alway return ONE,
independant from the currently selected sheet!

One way:

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

Peter said:
I need to use the worksheets name in a calculation, but I found no way
to get the worksheets name. Does anyone has a glue how to obtain it.
 
This almost solves my problem, but not completely. This is because
this formula always evaluates to the currently opened sheet, but what
I need is the following: On each sheet I need the name of this sheet
itself. E.g. on sheet ONE the formula must alway return ONE,
independant from the currently selected sheet!

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

J.E.'s formula works for me. Did you delete the ',A1' bits believing them to be
unnecessary? If so, that's your problem.
 
I really forgot to include the A1 parameter. After including it,
everything nows works as expected.

Thank you again.

Peter


This almost solves my problem, but not completely. This is because
this formula always evaluates to the currently opened sheet, but what
I need is the following: On each sheet I need the name of this sheet
itself. E.g. on sheet ONE the formula must alway return ONE,
independant from the currently selected sheet!

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

J.E.'s formula works for me. Did you delete the ',A1' bits believing them to be
unnecessary? If so, that's your problem.
 
Back
Top