New invoice number

Jenny809

New Member
Joined
Aug 12, 2019
Messages
5
Hi there! I am trying to create a code that will generate a new invoice number on my worksheet. I have cell H4 with a vendor number that is four digits long. I would like the invoice number to include the vendor number somehow 5647-78 for example. Could you please help me?
 
I tried the code. I got an error message. So i tried removing the first part of the code and i was able to get a number (vendor-01) but the 01 is not changing as i create a new invoice.
When i change the vendor and run the macro, it gives me the same thing (vendor -01). How can i make it keep counting or simply adding a 1 to the previous invoice?
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
So i tried removing the first part of the code
What exactly did you remove?
What does your current code look like?

Please put the code back to where I had it, and let me know the following:
- What is in cells HJ3 and H4 to start?
- What is the exact error message you are receiving?
- If you click on the "Debug" option when you get the error message, what line of code does it highlight?
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top