+ Reply to Thread
Results 1 to 9 of 9

Want to workbook name in cell A1 without file path and extension

  1. #1
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Want to workbook name in cell A1 without file path and extension

    hi,

    i am using below formula to extract workbook name without path

    Please Login or Register  to view this content.
    but i don't need extension (".xlsm") also

    above formula return = 17.2.17.xlsm
    but i need
    17.2.17


    thanx
    Use Code-Tags for showing your code :
    Please mark your question Solved if there has been offered a solution that works fine for you
    If You like solutions provided by anyone, feel free to add reputation using STAR *

  2. #2
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Want to workbook name in cell A1 without file path and extension

    If the file extension is always .xlsm then use this
    =SUBSTITUTE(REPLACE(LEFT(CELL("filename",A1),FIND("]",CELL("filename",A1))-1),1,FIND("[",CELL("filename",A1)),""),".xlsm","")
    Teach me Excel VBA

  3. #3
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Want to workbook name in cell A1 without file path and extension

    Thanx for reply Bhatti ji
    now result is
    17.2.17

    its ok

    but
    is it possible i format above value in date format

    like
    17.JAN.2017

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,428

    Re: Want to workbook name in cell A1 without file path and extension

    The second month is February ...
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Want to workbook name in cell A1 without file path and extension

    Quote Originally Posted by HaroonSid View Post
    Thanx for reply Bhatti ji
    now result is
    17.2.17

    its ok

    but
    is it possible i format above value in date format

    like
    17.JAN.2017
    Rename you workbook with this format 17.JAN.2017?

  6. #6
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Want to workbook name in cell A1 without file path and extension

    Ups! sorry @AliGW

    ok
    thanx a lot bhatti ji

  7. #7
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Want to workbook name in cell A1 without file path and extension

    [QUOTE=HaroonSid;4584271
    ok
    thanx a lot bhatti ji[/QUOTE]

    You are welcome.And thanks for the rep.

  8. #8
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Want to workbook name in cell A1 without file path and extension

    Quote Originally Posted by HaroonSid View Post
    thanx a lot bhatti ji
    You are welcome!
    And thanks for the rep!
    (Rep ke liye dhanawaad)

  9. #9
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Want to workbook name in cell A1 without file path and extension

    Admins my post #7 in this thread needs to be deleted as it was mistakenly left blank while trying to edit.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. File name + Directory Path too long.......saves file without extension..........
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-28-2016, 03:17 AM
  2. [SOLVED] I want to get file name without path and without extension...
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-07-2015, 11:01 PM
  3. [SOLVED] Help with formula to pick up a file path to a workbook from a cell in the same worksheet
    By Laura_93 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 01-13-2015, 10:39 AM
  4. Save a Workbook With A file path and name referenced cell
    By John Vieren in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-19-2013, 06:39 AM
  5. Formula to show the Filename (without path/extension) in a cell
    By acsishere in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-01-2013, 09:33 AM
  6. Replies: 5
    Last Post: 03-21-2013, 07:34 AM
  7. Using a cell reference as a file path to a workbook
    By SandyUK in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-16-2012, 02:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1