Counter

  • Thread starter Thread starter Rus
  • Start date Start date
R

Rus

Hello, I am making a simple invoice and would like to
have the invoice numbers increment by 1 when a new
invoice is started preferable changing when the date
changes. I only need one invoice each day.

Thanks
 
Since you only need one invoice per day, you could use the invoice date but
format it as a serial number. You could also set up a function that would
base the invoice number off of the invoice date.

- John
 
Thanks for the tip, this does work except when there
is a day off i.e. Sat or Sunday, then it keeps adding one
to the invoice. Any suggestions?
RUS
 
Aloha,
Wondering if you got any help with this. I have similar
question. An Order Form needs unique sales order numbers
assigned each time a new copy of the form is created
and/or saved. Can do with a database, but need to do
with Excel.

Tried =RAND to assign random numbers, but everytime a
change is made to the quantities in the form the random
number changes. So made that number fixed with F9, but
then if I save it in a macro to bed run on every new
instance of the form that same fixed number is applied to
every order form, obviously defeating the purpose.

FYI the order number is already comprised of three
segments - Cell 1 is a lookup to the rep account#, cell 2
is a lookup to the customer account #, and I need cell 3
to be unique. Order date won't work since same customer
may have multiple orders in a day. Couldn't figure out
how to make it work with time instead of date.

Anyone have a solution?
Many Mahalos,
Laurie
 
Here's a low-tech solution if you are recycling the same form over and over
again: add 1 to the value of cell C1 in the workbook's Before_Print event:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Sheet1.Range("C1") = Sheet1.Range("C1") + 1
End Sub

This code should go into the ThisWorkbook code module.
 
Back
Top