I have a very simple macro that I found on the internet that increases an invoice number by 1.
Sub NextInvoice()
Range("L1").Value = Range("L1").Value + 1
End Sub
It works great, provided the invoice number is just numbers. But I want to be able to add PF as in PF101425, on some of the invoices, not every invoice, however when I put the PF there the macro does not work.
There is more to the macro than just increasing the invoice number. It also populates other cells on a separate sheet with the information from the invoice and then clears all fields ready for the next invoice. So when I click on the button that triggers the macro the fields are populated correctly, even with the PF in front of the number, it is just the invoice number does not increase by 1.
If anybody can help with this problem it would be appreciated. Thank you.
Bookmarks