Thread: [Solved] Invoice Number Generation
View Single Post
 
Old 06-06-2010, 10:18 AM
Kimberly Kimberly is offline Windows 7 Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default

You could use a formula if you want. If you use this one, change the J10 to be the first StaffMember cell. Don't change the A1 references, they're there to produce a 1 but produce a 2 when copied (and then a 3, etc.) Copy down. The value will automatically generate as soon as data is entered into the StaffMember cell for that row.

=IF(LEN(J10)=0,"","PK"&REPT(0,4-LEN(ROW(A1)))&ROW(A1))

You can copy and paste values periodically if desired.

Another method: you could easily make a formula that would increment the value by 1 each row, and be formatted to display with PK and zeroes in front, but that would be displayed, not stored.
Reply With Quote