Next Invoice No.

Sahak

Well-known Member
Joined
Nov 10, 2006
Messages
1,008
Office Version
  1. 2016
  2. 2013
  3. 2011
  4. 2010
  5. 2007
Hi All,

My Records

Descript Qty Invoice Number
Pen Red 525 SAM-041918-1
Can Led 328 SAM-041918-2
Pen Red 422 SAM-041918-2
Map Big 630 SAM-041918-3
Pen Red 245 SAM-041918-4
Map Big 600 SAM-041918-4

for 6 (six) records above I already created 4 (four) invoices
Invoice #: SAM-041918-1 (1 record)
Invoice #: SAM-041918-2 (2 records)
Invoice #: SAM-041918-3 (1 record)
Invoice #: SAM-041918-4 (2 records)

I need a formula to get next invoice No. The next invoice number should be SAM-041918-5 (no matter how many records will be included in that invoice)

Thank you in advance
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi,

If you only need a formula to generate the Next invoice number:


Excel 2010
A
1SAM-041918-1
2SAM-041918-2
3SAM-041918-3
4SAM-041918-4
5SAM-041918-5
Sheet18
Cell Formulas
RangeFormula
A2=LEFT(A1,11)&MID(A1,12,255)+1


First invoice number manually entered, A2 formula copied down.
Let us know if that's not what you need, or there're more requirements.
 
Upvote 0
Thank you very much for your reply

I make invoices to different clients, in my example is SAM, it can be BNN, MBS, ABC …
I know for which client I should make an invoice. From my database I can get main part: SAM-041918, but I should know what is the maximum number of last part (after second dash), in my example it is “-4”, if I will know this, I will add 1 to 4 & will get 5 & add it to main part & it will become to SAM-041918-5
 
Upvote 0

Forum statistics

Threads
1,216,372
Messages
6,130,223
Members
449,567
Latest member
ashsweety

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