+ Reply to Thread
Results 1 to 4 of 4

Batch number generator

  1. #1
    Registered User
    Join Date
    10-02-2012
    Location
    Johannesburg South Africa
    MS-Off Ver
    Excel 2007, 2010
    Posts
    8

    Batch number generator

    I dont often use excel so I am not particularly proficient in it. I need a formula to assist me with batch number generating. Ideally I would like it to punch in the date in Coloumn A and have it generate a batch number with the year and month then some text and then a number allocation. so for example 1210mea01. This would need to roll over from the previous month, so for example in November it would need to start at 1211mea01 again.

    I have found a formula on another thread but i cant seem to modify it correctly to suit my purposes. That formula is

    =IF(OR(A2="",ISERROR(MONTH(A2))),"",RIGHT(YEAR(A2),1) & TEXT(MONTH(A2),"00") & TEXT(IF(OR(LEN(B1)<3,ISERROR(VALUE(B1))),1,IF(MONTH(A2)=VALUE(MID(B1,2,2)),VALUE(RIGHT(B1,3))+1,1)),"000"))

    Hope someone can help me.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Batch number generator

    Assuming that your dates start in A1, then in B1 and copy down, put this.

    =RIGHT(YEAR(A1),2)&MONTH(A1)&"mae"&DAY(A1)

    Is this, works for you?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Contributor Dave H9's Avatar
    Join Date
    03-10-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    418

    Re: Batch number generator

    Hi T1ger,

    In addition to Fotis1991's solution, please see attached. Should prevent duplicate batch numbers.

    Dave H
    Attached Files Attached Files
    - Mark your post [SOLVED] if it has been answered satisfactorily, by editing your original post using advanced mode.
    - Thank those that provided useful help, its nice and its very well appreciated...use the star on the lower left of the post

  4. #4
    Registered User
    Join Date
    10-02-2012
    Location
    Johannesburg South Africa
    MS-Off Ver
    Excel 2007, 2010
    Posts
    8

    Re: Batch number generator

    Thank you gentleman, your help is truly appeciated

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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