+ Reply to Thread
Results 1 to 5 of 5

Formula for Date from text

  1. #1
    Registered User
    Join Date
    04-20-2011
    Location
    CA
    MS-Off Ver
    Excel 2003
    Posts
    44

    Formula for Date from text

    Hi,
    I have a text filed that has Serial Numbers like "EBT0817J434" the 08 is the year and the 17 is the week of the year. I need the formula to return in a dd/mm/yyyy format. I have a formula (someone in this forum had helped me ) to extract the mm/yyyy from the same field but it did not extract the day. Below is that formula. If you can add the beginning of the week for the day to this formula, then great.
    Please Login or Register  to view this content.

    Thanks
    Gautam
    Last edited by gautamacharya; 03-22-2012 at 11:57 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-14-2012
    Location
    Arizona USA
    MS-Off Ver
    Excel 2000/2007
    Posts
    408

    Re: Formula for Date from text

    I would use a custom function for this.

    Please Login or Register  to view this content.
    If the encoded date is in cell A1, then in cell B1 you enter the formula =GetDate(A1)

  3. #3
    Registered User
    Join Date
    04-20-2011
    Location
    CA
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Formula for Date from text

    Thanks Dennis. I have a few more VB codes in the sheet and don't know how to add this code in. I tried but it gives a #NAME? error in excel.
    Could you possibly give the same formula in Excel instead of a VB Function?
    Thanks
    Gautam

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,804

    Re: Formula for Date from text

    I understand that you are using ISO week numbers, in which case you could use this formula to give the start date (Monday) of the week

    =DATE(100+MID(A1,4,2),1,MID(A1,6,2)*7-2)-WEEKDAY(DATE(100+MID(A1,4,2),1,3))
    Audere est facere

  5. #5
    Registered User
    Join Date
    04-20-2011
    Location
    CA
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Formula for Date from text

    Fantastic this will work !! Thanks much

+ 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