 |
OHSU's Software Forum Peer support for software.
|
| Welcome |
|
|
Welcome to OHSU's Software Forum.
You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today! |
| View previous topic :: View next topic |
| Author |
Message |
Bill Foust
Joined: 11 Apr 2008 Posts: 10
|
Posted: Thu Jul 17, 2008 9:09 am Post subject: Putting just the filename in your worksheet |
|
|
It's sometimes helpful to have the name of the file in your worksheet, and it's nice to have a formula that enters it automatically. The not so nice part is that with the standard formula provided by Excel:
=cell("filename")
you also get the complete directory path, which you may not want. Here's a formula that will enter just the filename:
=MID(CELL("filename",B18),FIND("[",CELL("filename",B18),1)+1,FIND("]",CELL("filename",B18),1)-FIND("[",CELL("filename",B18),1)-1)
Dissecting this formula to find out what each piece does might be interesting, but won't be discussed here, in the interest of brevity. Just one note - the "B18" that appears in the formula can be just any random cell; every cell has the same filename associated with it, so any cell will do.
Try it out; copy this formula to any cell in any worksheet and check your results.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
 Community Chest
|