+ Reply to Thread
Results 1 to 3 of 3

Need to make sequence number changes based on year purchased.

  1. #1
    Registered User
    Join Date
    04-28-2020
    Location
    kelantan, malaysia
    MS-Off Ver
    2013
    Posts
    2

    Question Need to make sequence number changes based on year purchased.

    Hi..

    TBH I am new in VBA, programming and macros.
    Currently, I am in a project where I need to register purchased item.
    For every purchased, it will generate a sequence number based on format - KBMC/YY/xxxx where:

    KBMC - my unique ID
    YY - last 2 digit purchased item year
    xxxx - sequence number

    i am using this code

    Please Login or Register  to view this content.
    currently the outcome is like this :

    KBMC/19/0001
    KBMC/19/0002
    KBMC/19/0003
    KBMC/20/0004 - THIS IS DIFFERENT DATE/YEAR
    KBMC/20/0005
    KBMC/19/0006 - THIS IS WHEN BACKDATED YEAR WAS ENTRED

    what I am expect the outcome should be like this

    KBMC/19/0001
    KBMC/19/0002
    KBMC/19/0003
    KBMC/20/0001 - THIS IS DIFFERENT DATE/YEAR
    KBMC/20/0002
    KBMC/19/0004 - suppose it follow year sequential.

    thanks in advance for help and guide.
    Attached Files Attached Files
    Last edited by suffian5; 05-14-2020 at 02:23 AM. Reason: add attachment

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    47,540

    Re: Need to make sequence number changes based on year purchased.

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  3. #3
    Registered User
    Join Date
    04-28-2020
    Location
    kelantan, malaysia
    MS-Off Ver
    2013
    Posts
    2

    Re: Need to make sequence number changes based on year purchased.

    thanks for the reminder


    suffian

+ 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. [SOLVED] Altering Week Number of the Year Sequence
    By bishode in forum Excel General
    Replies: 5
    Last Post: 11-16-2018, 11:47 AM
  2. [SOLVED] Total items purchased within fiscal year using a dropdown.
    By helmerr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-19-2017, 03:28 PM
  3. [SOLVED] Formula to get number based on sequence
    By rizmomin in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-17-2016, 07:29 AM
  4. Replies: 5
    Last Post: 07-15-2014, 02:46 PM
  5. [SOLVED] Select from drop down menu then assign unique sequence based on selection and year
    By evgn12 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-22-2014, 04:52 PM
  6. sequence number based on date
    By denise in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-19-2014, 03:09 PM
  7. VBA - Add a Sequence Number based on Condition
    By AGALLEGOS in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-12-2014, 06:03 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