Auto append data

  • Thread starter Thread starter Dan S.
  • Start date Start date
D

Dan S.

How does one append the data in a cell to reflect a particular account
number. I want my invoices to be numbered in the date format YYYYMMDD
and then I want the account number appended and finally the invoice
number. Is there a way to do this automatically?

The cell may contain an =today() or something similar. But, I don't
know how to append it automatically.

Ex.
YYYYMMDD-AAAA-001
YYYYMMDD-AAAA-002

where, AAAA is the last four number of the account. And, of course,
the number is the invoice for the day.
 
Perhaps something like this might work for you

Assuming account numbers will be entered in A2 down for a certain day

Place this in B2:
=IF(A2="","",TEXT(TODAY(),"yyyymmdd")&"-"&TEXT(RIGHT(A2,4),"0000")&"-"&TEXT(COUNTIF($A$2:A2,A2),"000"))
Copy down as far as required. At the end of the day, freeze col B with an
"in-place": Copy > Paste special as values. Col B returns what you're after.

Repeat the set up above afresh on a new sheet for the next day.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Using VBA to rearrange data 0
Numbering Excel template 2
Append Invoice 22
Invoice Append 1
Relative Macro Help on Keystrokes 9
Complex Match 3
Making a field value append a hyperlink 4
Append/Update Query 6

Back
Top