Current location - Recipe Complete Network - Catering training - How does Excel find serial invoices?
How does Excel find serial invoices?
Sort by invoice number column in ascending order, and then write IF function comparison. For example, if the invoice number is in column C, write the formula from the second invoice line, for example, write the formula in D3:

=IF(RIGHT(C3,7)-RIGHT(C2,7)= 1, 1,"")

Drop down the formula to get the invoice quantity with serial number.

Pay attention to the number of digits in the invoice. For example, if it is considered as 7 digits, it can be changed to the actual number of digits.