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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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...
Bill GoldenExecutive Managing MemberAuthor Commented:
It is save but all I got was #VALUE!
Roy CoxGroup Finance ManagerCommented:
See this explanation

File Name in Cell
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

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

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

Open in new window


Saurabh...
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

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
ProfessorJimJamMicrosoft Excel ExpertCommented:
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

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....
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.
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.