Displaying a portion of the tab name in a cell

I have tabs that are generally 1234A-0914.  I want to display the FIRST FIVE CHARACTERS in a Cell.
LVL 1
Bill GoldenExecutive Managing MemberAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saurabh Singh TeotiaCommented:
Use this formula..
=MID(CELL("filename"),FIND("]",CELL("filename"),1)+1,FIND("-",CELL("filename"),1)-FIND("]",CELL("filename"),1)-1)

Open in new window


This will give you the sheet name if your workbook is saved..

Saurabh...
0
Bill GoldenExecutive Managing MemberAuthor Commented:
It is save but all I got was #VALUE!
0
Roy CoxGroup Finance ManagerCommented:
See this explanation

File Name in Cell
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Bill GoldenExecutive Managing MemberAuthor Commented:
And, I am looking for the first 5 characters of the TAB
0
Saurabh Singh TeotiaCommented:
Sorry the formula will be..

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

Open in new window


Saurabh...
1
Roy CoxGroup Finance ManagerCommented:
This formula works for me

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

To get the first five caracters

=LEFT(RIGHT(CELL("filename",D2),LEN(CELL("filename",D2))-FIND("]",CELL("filename",D2))),5
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ProfessorJimJamCommented:
use this one flawless

=LEFT(IF(ISERROR(RIGHT(CELL("filename",$A$1),LEN(CELL("filename",$A$1))-FIND("]",CELL("filename",$A$1)))),"This workbook never saved",RIGHT(CELL("filename",$A$1),LEN(CELL("filename",$A$1))-FIND("]",CELL("filename",$A$1)))),5)

Open in new window

1
Bill GoldenExecutive Managing MemberAuthor Commented:
That did the trick, although 2003 wanted to stick close parenthesis at the end.  (I am too doped up from drugs for a hyper-extended knee to count the parenthesis but I will take the program's word for it!) Thanks a million....
0
Bill GoldenExecutive Managing MemberAuthor Commented:
Sorry Saurabh and Professor. I didn't see your solutions come in but I got a solution.  Maybe you can help on the next one.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.