+ Reply to Thread
Results 1 to 9 of 9

Generate Serial number based on date

  1. #1
    Registered User
    Join Date
    02-09-2015
    Location
    Salt Lake
    MS-Off Ver
    7
    Posts
    3

    Generate Serial number based on date

    I am trying to have excel generate a serial number based on dates. In column a I enter the date (usually today's date) and want column B to generate a simple serial number yyJJJ.01 with the decimal increasing with each instance of the same date. I have a formula working for everything in front of the decimal but can't get the decimal to change unless I enter it manually (which I have been doing) here is the formula I am using =RIGHT(YEAR(A2),2)&TEXT(A2-DATE(YEAR(A2),1,0),"000.01"), any help is appreciated

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Generate Serial number based on date

    Maybe B2:

    Please Login or Register  to view this content.
    and drag down?
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    02-09-2015
    Location
    Salt Lake
    MS-Off Ver
    7
    Posts
    3

    Re: Generate Serial number based on date

    Thanks but this changes the number before the decimal and in random amounts.
    09-Feb-2015 15040.01
    09-Feb-2015 13172.01
    09-Feb-2015 13214.01
    09-Feb-2015 13254.01
    09-Feb-2015 14050.01
    09-Feb-2015 14052.01
    09-Feb-2015 14092.01
    The first in the string is what the formula I am using generates, when I posted the suggestion are the next 6 in the string

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Generate Serial number based on date

    Wrong absolute reference.

    Change:
    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-09-2015
    Location
    Salt Lake
    MS-Off Ver
    7
    Posts
    3

    Re: Generate Serial number based on date

    Beautiful! Thank you,, your help is much appreciated.

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

    Re: Generate Serial number based on date

    Wouldn't it be simpler to count the dates in column A for the decimal part?

    Using that approach you could use this formula which returns a number

    =TEXT(A2,"yy")*1000+A2-DATE(YEAR(A2),1,0)+COUNTIF(A$2:A2,A2)/100

    format as number
    Audere est facere

  7. #7
    Registered User
    Join Date
    10-16-2019
    Location
    Khobar, Saudi Arabia
    MS-Off Ver
    2013
    Posts
    2

    Re: Generate Serial number based on date

    Hi..I'm just new here and I fascinated how you were discussing the serial number generation.

    I was wondering how can I make serial number from a given date and reflect it on the adjacent cell as QYYMM.RR, where Q is only reference leter, YY is the year (in 2 digit format), MM (in 2 digit format) is the month and RR is the running number in decimal that increases if it the previous value in a column is the same date while it restarted to .01 when it is new date?

    example:

    September 30, 2019 Q1909.01
    October 01, 2019 Q1910.01
    October 01, 2019 Q1910.02
    Last edited by SAMMY101; 10-16-2019 at 04:03 PM.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Generate Serial number based on date

    Quote Originally Posted by SAMMY101 View Post
    Hi..I'm just new here and I fascinated how you were discussing the serial number generation.

    I was wondering how can I make serial number from a given date and reflect it on the adjacent cell as QYYMM.RR, where Q is only reference leter, YY is the year (in 2 digit format), MM (in 2 digit format) is the month and RR is the running number in decimal that increases if it the previous value in a column is the same date while it restarted to .01 when it is new date?

    example:

    September 30, 2019 Q1909.01
    October 01, 2019 Q1910.01
    October 01, 2019 Q1910.02
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  9. #9
    Registered User
    Join Date
    10-16-2019
    Location
    Khobar, Saudi Arabia
    MS-Off Ver
    2013
    Posts
    2

    Re: Generate Serial number based on date

    Admin,

    I see. Okay. Perhaps I'll have to generate new inquiry as you said.
    Thanks for the reminder.

    Sam

+ 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. Auto generate serial number
    By silambarasan.J in forum Excel General
    Replies: 2
    Last Post: 01-31-2015, 12:46 PM
  2. Auto generate serial number
    By silambarasan.J in forum Excel General
    Replies: 3
    Last Post: 01-31-2015, 08:33 AM
  3. code to generate serial number based on number of records
    By winmaxservices1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2015, 03:21 AM
  4. how to generate serial number on a textbox in userform
    By minionrush in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-16-2013, 05:12 AM
  5. Need macro/script to generate serial number labels
    By c.young in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-04-2012, 06:18 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