![]() |
sequential invoice numbering
Hi there,
I have designed my own invoice in exel, in the same workbook as the invoice I have an invoicing sheet with a custom invoice no's. collum and a client name collum, to keep record of invoice numbers that had been used. What I need is to prevent duplicating invoice numbers by way of a formula that can generate the next available invoice number. |
sequential invoice numbering
Private Sub Worksheet_Activate() Sheets("Invoice Form").Select ActiveSheet.Unprotect Range("A1") = Range("A1").Value + 1 End Sub If you put this in the worksheet code every time you return to the sheet it will increment the value of A1 by 1, make sure there is a value there every time you open the workbook to that sheet or come back to that sheet it will increase the number.......Crude but it works! P.s you can always set the value of the cell to be a figure HTH Simon -- Simon Lloyd ------------------------------------------------------------------------ Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708 View this thread: http://www.excelforum.com/showthread...hreadid=550262 |
All times are GMT +1. The time now is 02:49 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com