+ Reply to Thread
Results 1 to 10 of 10

mm/yy out of a serial number

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

    mm/yy out of a serial number

    I have a serial no of a product for in cell A1. EBT0806S870. Out of this, the 4th letter from the left is the beginning of the date code- 0806. The first two letter are the year 2008 and the next two are the week-06. I would like to extract the month out of the week. I would like to output to be 08/02 (yy/mm)so that i can pivot this data elsewhere.

    Thanks for your help.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: mm/yy out of a serial number

    Hi and welcome to the board

    How do you define week1 ? ISO ? 1st Monday of year ? Week containing Jan 1st?

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

    Re: mm/yy out of a serial number

    Hi Arthur-
    ISO is the defn we are using.

    Thanks
    Gautam

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: mm/yy out of a serial number

    hi, please check attachment
    Attached Files Attached Files

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

    Re: mm/yy out of a serial number

    Fantastic watersev. It works like magic. Thanks a lot.

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

    Re: mm/yy out of a serial number

    Watersev,
    Also any idea how to remove the day from this? When i pivot it, the dropdown still has the mm/dd/yyyy format. I would like to see only the yy/mm format in the dropdown. Possibly make this a text? Please help.

    Thanks
    Gautam

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: mm/yy out of a serial number

    in order to make it yy/mm format I used custom date format yy/mm (select range - right mouse click - format - all and write yy/mm) or check the format in posted file. Hope this helps

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

    Re: mm/yy out of a serial number

    Thanks again !!

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

    Re: mm/yy out of a serial number

    Hey I tried that, id does not work. It works ok for seeing the values in the sheet. But when you pivot it in a pivot table, and drop down to select multiple cells, it shows the entire mm/dd/yyyy. I have attached the spreadsheet. Please look. So maybe if you can get the output to be the first of the month instead of the exact day, it will work.
    Attached Files Attached Files

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

    Re: mm/yy out of a serial number

    I got a formula for that it is, =DATEVALUE(MONTH(A1)&"/"&YEAR(A1)). Can you combine this formula with the one you have.=DATE("20"&LEFT(MID(A2,4,4),2),1,1)+RIGHT(MID(A2,4,4),2)*7

+ 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