+ Reply to Thread
Results 1 to 2 of 2

Automatic increase invoice numbers

  1. #1
    Registered User
    Join Date
    01-27-2013
    Location
    SA
    MS-Off Ver
    Excel 2010
    Posts
    37

    Automatic increase invoice numbers

    Hi

    Thus far I could not find any joy solving my issue.
    Would you be so kind in helping to sort this out

    I need excel to check a folder D:/invoices on my pc and determine the highest number invoice and add (+1) to the highest number and write the number into sheet 'Entertainment Invoice'!H6 .


    for example: file names are
    432 Invoice Shelly De Wet - Velmore (28 Oct 2013) L'Aquila.xlsx
    433 Invoice Trudie Delport - CSIR (30 Oct 2013) City Hall.xlsx

    So if I open a new invoice the number 434 is automatically displayed into the new invoice sheet ...into 'Entertainment Invoice'!H6

    Your help will be highly appreciated

    PS.
    Just to clarify.

    When I open the invoice the invoice number is not filled in.

    Invoices are located as seperately saved documents in .xlsx format in a folder (d:/invoices)
    for example:
    432 Invoice Shelly De Wet - Velmore (28 Oct 2013) L'Aquila.xlsx
    433 Invoice Trudie Delport - CSIR (30 Oct 2013) City Hall.xlsx

    So if I open a new invoice the next invoice number 434 is automatically displayed into sheet 'Entertainment Invoice'!H6

    Kind regards

  2. #2
    Forum Contributor
    Join Date
    09-30-2013
    Location
    Toronto, ON
    MS-Off Ver
    Excel 2007
    Posts
    229

    Re: Automatic increase invoice numbers

    You can list the files in the folder with the DIR function but unfortunately there is no easy way of the largest number. You can't specify a sort order.
    Something like this could work, but it's a bit cumbersome.
    You need to uncomment the iFileNo = line. I didn't have a number of files with numbers in front to test on. You can see what would be returned with the msgbox code. You would remove that for the actual calculation.

    You may also need to put in some logic in case you have any other files in the folder that don't start with a number.


    Please Login or Register  to view this content.

+ 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. Increase Number Invoice
    By OSSIE in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-09-2008, 03:28 PM
  2. AUTOMATIC INVOICE NUMBERS
    By Andreas in forum Excel General
    Replies: 1
    Last Post: 03-08-2006, 03:10 PM
  3. SET UP AUTOMATIC INVOICE NUMBERS
    By nothingnice in forum Excel General
    Replies: 2
    Last Post: 01-10-2006, 06:10 PM
  4. Automatic update of invoice numbers
    By Diamond Jones in forum Excel General
    Replies: 1
    Last Post: 11-07-2005, 12:15 AM
  5. Increase the number of the invoice
    By John B in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-24-2005, 09:06 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