Populate cell with Worksheet name

P

Paul B

jimbob, try this,

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
file must be saved first

You may also want to have a look here

http://www.xldynamic.com/source/xld.xlFAQ0002.html


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
J

jimbob

Thanks Paul. That works great. Just one question. What is the "+1,255"
at the end of the formula for?
 
J

JE McGimpsey

The +1 means you start one character *after* the right bracket.

The 255 is just a large number of characters to include. 32 would be
sufficient. I've always used 255 just because it's the largest integer
that will fit in one byte (2^8 - 1). Such conventions were more common
back when people actually coded applications in assembly language.
 
Top