+ Reply to Thread
Results 1 to 3 of 3

generate sequential Number when a sheet is inserted

  1. #1
    Registered User
    Join Date
    01-29-2014
    Location
    ahmedabad
    MS-Off Ver
    Excel 2007
    Posts
    59

    generate sequential Number when a sheet is inserted

    Hi,
    I have a file in which i prepare Delivery Challan n invoice. Many times order has to be sent in parts and each time a part is sent, Delivery Challan Number changes while Invoice Number remains same.

    For each order, there is a single Reg No. and a single invoice number but Delivery Challan number may vary from 1 to more.
    my delivery challan Number format is: "Reg No." followed by "/" and then the number "001" , "002" etc.

    For eg. I have an order of 9 products (I register order in my company as Reg. No).
    In 1st batch 3 products are sent (1st Delivery challan and invoice is generated:- D.C No.: Reg No/001).
    In 2nd batch other 4 products are sent (2nd Delivery challan and invoice is generated:- D.C No.: Reg No/002) and
    remaining in 3rd batch (3rd Delivery challan and invoice is generated:- D.C No.: Reg No/003).

    I would prefer if Delivery Challan number is generated in sequence automatically for each such sheet (sheet names vary because I rename the sheet with the date of generating invoice)

    I have attached the sample file for better understanding.

    Thanx a lot..
    Attached Files Attached Files
    Last edited by taralmehta15; 07-30-2015 at 01:27 AM.

  2. #2
    Registered User
    Join Date
    08-01-2012
    Location
    Montreal, Qc, Canada
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: generate sequential Number when a sheet is inserted

    if i understand correctly, you would like the number after the "/" to increase by 1 every time you create a page..


    run the following after page creation and it will update with the current page number. my not be the best way but as long as your sheets are in order it will work

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-29-2014
    Location
    ahmedabad
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: generate sequential Number when a sheet is inserted

    Thanx for the help.. I also found an alternate way as follows:
    Using Command button to add sheet and before adding sheet, using this code: (code not mine. Copied from another thread of this forum and modified to suit my file. credits to that guy for the code.)

    Please Login or Register  to view this content.
    And then I referred my cell G8 to the refcell vich generates sequential no on clickin command button. Reference looks like:- cell G8=J1&"/"&I1

    (Cell J1 has the copy of reg no).

    Hence, a bit confusing but i works..

    Thanx for your efforts.. Reps added.. Have a wonderful day..

+ 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] VBA Generate a unique reference number for a newly inserted row
    By SKooLZ in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-19-2015, 07:11 PM
  2. VBA Generate a unique reference number for a newly inserted row
    By SKooLZ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-18-2015, 08:21 PM
  3. Generate Sequential number batches
    By ciag in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-08-2015, 10:30 AM
  4. [SOLVED] Generate Sequential Number Only When CommandButton1 Saves As Different File
    By d_striker in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-06-2013, 12:04 PM
  5. How to generate sequential intervals from whole number
    By Mekon in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-14-2013, 04:12 PM
  6. How to generate sequential intervals from whole number
    By Mekon in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-14-2013, 03:59 PM
  7. Auto Generate Sequential Invoice Number
    By jneldon in forum Excel General
    Replies: 1
    Last Post: 03-09-2009, 01:17 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