We help IT Professionals succeed at work.

Displaying a portion of the tab name in a cell

Bill Golden
Bill Golden asked
on
133 Views
Last Modified: 2015-07-30
I have tabs that are generally 1234A-0914.  I want to display the FIRST FIVE CHARACTERS in a Cell.
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2015

Commented:
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 Member

Author

Commented:
It is save but all I got was #VALUE!
Roy CoxGroup Finance Manager
CERTIFIED EXPERT

Commented:
See this explanation

File Name in Cell
Bill GoldenExecutive Managing Member

Author

Commented:
And, I am looking for the first 5 characters of the TAB
CERTIFIED EXPERT
Top Expert 2015

Commented:
Sorry the formula will be..

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

Open in new window


Saurabh...
Group Finance Manager
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Professor JMicrosoft Excel Expert
CERTIFIED EXPERT
Top Expert 2014

Commented:
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 Member

Author

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 Member

Author

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.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.