+ Reply to Thread
Results 1 to 8 of 8

Google Sheets: Lot Number to Date...?

  1. #1
    Registered User
    Join Date
    10-14-2010
    Location
    Midland., MI
    MS-Off Ver
    2019
    Posts
    10

    Thumbs up Google Sheets: Lot Number to Date...?

    I have lot numbers in the following format:
    EC06JUN2024
    ET02APR2024
    ER05MAY2024

    Is there anyway I could make a formula that would convert them to this:
    6/30/2024
    4/30/2024
    5/31/2024

    -truncate/discard the first 4 characters
    -convert the month abbreviation to a number
    -and here's the really tricky part, make it the last day in that month (or at least the 29th)

    So far I have come up with =LEFT("")&MID(A1,5,3)&"/29/"&RIGHT(A1,4)
    which gives me
    JUN/30/2024
    APR/30/2024
    MAY/31/2024

    Which if typed in would convert with formatting...

    Any thoughts anyone has would be greatly appreciated.
    Nick
    Last edited by nickdclements; 07-30-2021 at 11:12 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,145

    Re: Lot Number to Date...?

    Try

    =EOMONTH(DATE(--RIGHT(A1,4),MONTH(MID(A1,5,3)&0),1),0)

    format as required
    Last edited by JohnTopley; 07-28-2021 at 02:52 PM.

  3. #3
    Registered User
    Join Date
    10-14-2010
    Location
    Midland., MI
    MS-Off Ver
    2019
    Posts
    10

    Re: Lot Number to Date...?

    That's awesome, thank you!
    It works great in Excel, I was hoping it would also work in Google Sheets, but can't have it all.

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,288

    Re: Lot Number to Date...?

    1. Your profile says Excel 2003 - is this up-to-date?
    2. You never mentioned Google Sheets, so nobody knew that this was meant to be a formula for that platform.
    3. You posted in the wrong forum section for a Google Sheets query. I will move the thread now.
    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
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Google Sheets: Lot Number to Date...?

    Similar to JohnTopley's

    Don't know if it works in Google sheets or not. Try

    =EOMONTH(RIGHT(A1,7),0)

    and fill down.

    EOMONTH automatically converts the date strings to numbers.
    Dave

  6. #6
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Google Sheets: Lot Number to Date...?

    the formula by FlameRetired works well in Google Sheets
    As a gesture off appreciation, you can click * Add Reputation at the foot of any of the posts of members who helped you reach a solution.

    And finally, was your problem solved? if so, please click Thread Tools above the first post of your enquiry, then select [Solved]

  7. #7
    Registered User
    Join Date
    10-14-2010
    Location
    Midland., MI
    MS-Off Ver
    2019
    Posts
    10

    Re: Google Sheets: Lot Number to Date...?

    Thank you, that's awesome!

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Google Sheets: Lot Number to Date...?

    Glad to hear.
    Thank you for the feedback and added rep.

    If this answers your question please take time to mark your thread Solved.

+ 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. Google Sheets: Need to find the match number then enter the text
    By tuongtu3 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 8
    Last Post: 04-01-2021, 01:13 AM
  2. Google Sheets: How to count the number of times a certain value has been chosen
    By cwinhall in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 02-14-2021, 01:32 PM
  3. Google Sheets Master Sheet that pulls in data from other sheets with the last edit date
    By Badvgood in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 12-19-2020, 12:04 PM
  4. RANK/automatically put my data in highest number order (google sheets)
    By rayted in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 02-28-2020, 01:19 PM
  5. Google Sheets: Conditional formating according to date
    By akshay6s in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 7
    Last Post: 04-19-2019, 08:56 AM
  6. Google Apps Script for Google Sheets Pulling Formulas from Master to Several Slave Sheets
    By excelroofing in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 08-22-2018, 02:06 AM
  7. SUMIF with different date formats (Google Sheets)
    By djarcadian in forum Excel General
    Replies: 1
    Last Post: 08-09-2014, 08:16 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