+ Reply to Thread
Results 1 to 3 of 3

excel formula to return m/d/yyyy based on filename

  1. #1
    Registered User
    Join Date
    08-31-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    87

    excel formula to return m/d/yyyy based on filename

    hi,

    i have a question. i currently have this excel formula to grab the excel file name:

    =MID(CELL("filename"),SEARCH("[",CELL("filename"))+1, SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1)

    the file name will always be in this format m.dd.yyyy human resources report.xls

    e.g.: 8.27.2012 human resources report, 7.28.2012 human resources report, etc

    i want to create a formula that will grab the month from the file name.

    so if the file name is 8.27.2012 human resources report.xls, the formula will return 8/1/2012.

    the day will always be the first, year will be current year. month will depend on the file name. if the filename is august (8th month), then the month would be 8.

    whats the formula for this?

    thanks!

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: excel formula to return m/d/yyyy based on filename

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by martindwilson; 09-23-2012 at 07:53 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    08-31-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    87

    Re: excel formula to return m/d/yyyy based on filename

    thankss, it's working

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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