ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Populate cell with Worksheet name (https://www.excelbanter.com/excel-discussion-misc-queries/57384-populate-cell-worksheet-name.html)

jimbob

Populate cell with Worksheet name
 

Is there a way to automatically populate a cell with the Worksheet tab
name? Thanks


--
jimbob
------------------------------------------------------------------------
jimbob's Profile: http://www.excelforum.com/member.php...o&userid=29107
View this thread: http://www.excelforum.com/showthread...hreadid=488412


Paul B

Populate cell with Worksheet name
 
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

"jimbob" wrote in
message ...

Is there a way to automatically populate a cell with the Worksheet tab
name? Thanks


--
jimbob
------------------------------------------------------------------------
jimbob's Profile:

http://www.excelforum.com/member.php...o&userid=29107
View this thread: http://www.excelforum.com/showthread...hreadid=488412




jimbob

Populate cell with Worksheet name
 

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


--
jimbob
------------------------------------------------------------------------
jimbob's Profile: http://www.excelforum.com/member.php...o&userid=29107
View this thread: http://www.excelforum.com/showthread...hreadid=488412


JE McGimpsey

Populate cell with Worksheet name
 
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.

In article ,
jimbob wrote:

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



All times are GMT +1. The time now is 09:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com