JohnZ1156
Board Regular
- Joined
- Apr 10, 2021
- Messages
- 160
- Office Version
- 2021
- Platform
- Windows
I have a simple invoice sheet. On it there is a pregenerated invoice nuumber. After filling in the invoice data , I have a macro that will copy the details to an "Invoice List" sheet, however, I don't want it to copy if it has already copied the data. Best way I can think of is to check for the invoice number.
For example:
If the current invoice number (InvNo) is equal to the maxumum invoice number on the "Invoice List" sheet, (Column A)
then message, "Invoice already exists", and do nothing.
Else copy data to "List sheet" and clear invoice sheet ready for next entry.
Here are my variables:
Current Invoice number = InvNo
Invoice number column in list sheet is column A
For example:
If the current invoice number (InvNo) is equal to the maxumum invoice number on the "Invoice List" sheet, (Column A)
then message, "Invoice already exists", and do nothing.
Else copy data to "List sheet" and clear invoice sheet ready for next entry.
Here are my variables:
Current Invoice number = InvNo
Invoice number column in list sheet is column A