Search code examples
excel-formulastring-concatenationexcel-2013

Sequence number that reset if year changes


I need a formula that reset the sequence 001 if year changes

Here's My Example

i tried but i dont know how to reset the sequence number

https://docs.google.com/spreadsheets/d/18GgcmPiWNh7R8Uj1xG5wdWK8w-tI8J995-6I8YnalLo/edit?usp=sharing


Solution

  • You could use the following in D3: =text(iferror(if(year(C3)<>year(C2),1,left(D2,3)+1),1),"000")&"-"&right(year(C3),2)

    Or if you want the result in column B change D2 to B2 in the formula.