Need Worksheet Code

J

jacob

I need to find out how to place the name of the current tab or active tab in
a cell How do i do this. It is easy to do in a Header of Footer but i want to
be able to do it in a cell.

Thanks!!!
 
C

Chip Pearson

Jacob,

Try the following formula

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

The file must have been saved for this to work. It won't work if
the file has never been saved.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
S

Sloth

=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1)))

you need to have saved the file at least once before it will work.
 
J

jacob

Thanks guys!!!!!!!!!!!!!!!!!!11

Sloth said:
=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1)))

you need to have saved the file at least once before it will work.

jacob said:
I need to find out how to place the name of the current tab or active tab in
a cell How do i do this. It is easy to do in a Header of Footer but i want to
be able to do it in a cell.

Thanks!!!
 
Top