+ Reply to Thread
Results 1 to 11 of 11

generating alphanumeric code

  1. #1
    Registered User
    Join Date
    07-09-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    3

    generating alphanumeric code

    Sir,

    Can anybody help me in writing vba code for excel to generate automated alphanumeric code having first entry as L,P,G,T(based on a condition), next four numbers starting from 0001 and last four as mmyy format for the current month and year. The code should be unique and increasing in pattern and should serve 20-25 users working at a time connected through internet/intranet/LAN.

    Rgds,

    Pankaj

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: generating alphanumeric code

    Not really, workbooks aren't really synced like that, I don't know if you could guarantee the numbers would be unique without a central file/database or without using guids

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: generating alphanumeric code

    Copy paste the below formula in a cell


    =TEXT(ROWS($1:1),"L0000")&TEXT(TODAY(),"MMYY")


    Drag it down...


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: generating alphanumeric code

    @sixthsense, how does that work when it needs to be unique across 25 users?

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: generating alphanumeric code

    Quote Originally Posted by Kyle123 View Post
    @sixthsense, how does that work when it needs to be unique across 25 users?
    If the workbook is in shared mode lol

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: generating alphanumeric code

    Shared workbooks should all be burnt. Especially if you have 25 concurrent users lol

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: generating alphanumeric code

    I accept it but I recall our earlier discussion about shared workbook and I managed to work with 30 users also but it requires proper usage / maintenance

  8. #8
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: generating alphanumeric code

    eugh rather you than me glad it's working for you though

  9. #9
    Registered User
    Join Date
    07-09-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    3

    Re: generating alphanumeric code

    Thanx all for your input. The file would be on sharing mode. @sixthsence, your suggestion works well beginning with L only, but the alphanumeric code should begin with Either of L,P,G or W based on a condition.

    Rgds,

  10. #10
    Registered User
    Join Date
    07-09-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    3

    Re: generating alphanumeric code

    @Kyle123, could you please help me writing the vba for choosing first number appearing against an empty cell. Let me make myself more clear. I want a vba coding for chosing a number appearing against available empty cell. Rgds,

  11. #11
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: generating alphanumeric code

    Quote Originally Posted by Pankaj51 View Post
    based on a condition.
    Without knowing that condition we cant give you the exact solution

+ 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. Generating random number string based on Alphanumeric String
    By ridemeve in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-15-2014, 04:56 PM
  2. [SOLVED] Add ALPHANUMERIC Code
    By mahershams in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-01-2014, 06:15 AM
  3. Generating a 4 part Alphanumeric Sequence
    By Label-makers in forum Excel General
    Replies: 20
    Last Post: 06-06-2012, 07:54 PM
  4. Replies: 0
    Last Post: 04-20-2012, 06:55 AM
  5. Generating AlphaNumeric SKU by dropdown list
    By kebgx6 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-22-2010, 12:36 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