+ Reply to Thread
Results 1 to 4 of 4

Sheet tab name in cell converted to date

  1. #1
    Registered User
    Join Date
    04-25-2013
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    2

    Sheet tab name in cell converted to date

    Hi Forum Members,

    I need help with the following situation:

    I have a worksheet with 31 sheets and the sheet tabs are named in the format M.D.YY for each day of the month. For example todays tab would read 4.25.13 (btw. the format has to stay this way and should not be changed).

    I need to copy the sheet tab name to a cell in the same sheet. I know how to do this with the following formula:
    =MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)

    However, I need the cell the show the date as Thursday, April 25, 2013 (Thursday 4/25/13 or Thursday 4.25.13 would also work) and not just as 4.25.13 that the above formula generates. A simple cell format change did not work.

    Any help is greatly appreciated.

    Thank you.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Sheet tab name in cell converted to date

    perhaps
    =TEXT(SUBSTITUTE(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),".","/")+0,"dddd, mmmm dd, yyyy")

    or if you need it stored as a date use
    =SUBSTITUTE(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),".","/")+0
    and change the cell format
    Last edited by JosephP; 04-25-2013 at 09:25 AM.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Sheet tab name in cell converted to date

    Hi,

    That's because the function returns text and not a number. You need to string slice the result of that formula and deconstruct it into three numbers for year, month and day, then rebuild a proper date number with the =DATE() function. Then format that as necessary.

    Regards
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    04-25-2013
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Sheet tab name in cell converted to date

    Great. Thank you very much for your help Joseph.

+ 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