Learn Excel 2010 - "Next Invoice Number": Podcast #1505

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
3,002
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jan 10, 2012

The Question: "How do I generate the next Invoice Number?" Microsoft Office Online offers a great number of Invoice Templates. However, none of those templates has a Macro to pull the next Invoice Number. Today, in Episode #1505, Bill shows us how to 'Macro Enable' our Workbook and then create a short VBA Code routine to automatically generate Invoice Numbers with the press of a mouse button.

...This episode is the video podcast companion to the book, "Learn Excel 2007 through Excel 2010 from MrExcel". Download a new two minute video every workday to learn one of the 512 Excel Mysteries Solved! and 35% More Tips than the previous edition of Bill's book!

"The Learn Excel from MrExcel Podcast Series"

MrExcel.com — Your One Stop for Excel Tips and Solutions. Visit us today!

Link to this comment:

Share to:

Uploader Comments (bjele123)

  • Dear Bill,

    I have a wokrbook which contains formulas from other workbooks (source files)

    When I close those source files and run macro to save a copy to a specified folder all values where formulas existed show error in the saved file.

    WHat adjustment should I made to the code?

    The code is almost the save as yours.

  • @MrAnarhasanov This sounds like a problem with Excel linking to closed workbooks. An Excel file can not read more than 10,000 cells from a closed workbook. It is easy to hit the 10K limit = VLOOKUP(A2,[ClosedWorkbook.xls­x]Sheet1!A1:J1001,2,False) is reading from 10010 cells. Can you save the workbook before closing the source files?

  • @bjele123 Thank you for answer, Bill. I save the file before closing source files.

    The file contains several types of formulas (vlookup, sumproduct, dget etc.) I just realized that only cells which contain vlookup formulas don't return error. So I should try to change formulas to vlookup. OR is there any tip that I can adjust those other formulas in such a way that they don't return error?

  • @MrAnarhasanov If VLOOKUP and SUMPRODUCT are working, then the issue is with DGET? I've never tried using DGET to an external workbook. There is an add-in floating around called "PULL" written by Harlan Grove. You might see if you can find this add-in in your search engine. (The add-in was stored at members.aol.com and was wiped out when AOL discontinued this service.) PULL would solve this problem.

  • @VeritasAmantesVocat To print 200 blank invoices for completion by hand: If the invoice number in J5 & you wanted to print blank invoices 1001 through 1200.

    1. Alt+F11

    2. Insert, Module

    3. Paste the following, without the numbered steps.

    4. Sub PrintBlankInvoices()

    5. For i = 1001 To 1200 : Range("J5").Value = i : ActiveSheet.PrintOut : Next

    6. End Sub

    7. Alt+Q to return to Excel

    8. Alt+F8 to display the list of macros

    9. Select the above macro and choose Run.

see all

All Comments (11)

Sign In or Sign Up now to post a comment!
  • @bjele123 OK, thanks

  • @bjele123 Sumproduct also works fine.

  • Sumproduct also works fine.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more