Calculating & Writing Sequence Number which has to reset with the change of month

Looking for a solution to have sequence number that has to be written on three-digits like 001, 002 etc and the sequence has to be reset with the change of month. Also the same has to be prefixed with defined characters along with month & year of the day.

I could think of the prefix logic using concatenate but not abe to figure out the way to add 3 digit sequence number having reset mechanism with the change of month

CONCATENATE(โ€œMB-INVโ€, TEXT([Date], โ€œyymmโ€), _______)

Any suggestion?

Solved Solved
0 2 1,275
1 ACCEPTED SOLUTION

I figured out a way to do this where I wanted to have the value of column [Rececipt Number] in sequence and the sequence shall reset to 1 at the change of month.

  1. use the following or similar expression in google sheet

CONCATENATE("" &"MB/PMT/" &text(A3,"yymm") &TEXT(IF(MONTH(A3)=MONTH(A2),VALUE(RIGHT(N2,3))+1,1),"000"))

  1. Regenerate the structure of the respective table
  2. this formula would become the value of Autocompute Spreadsheet formula
  3. And then every row would have a different value in sequence and the following result is achieved
    3X_2_7_276b6d78f319c614b067049d2b7b2749b9eaf25b.png

The only catch is that the value of 1st row would show as kind of error, which I personly handled by manually setting the value to MB/PMT/2012000. This value in above snapshot has been set manually
3X_e_b_eb4ab2a042e13f1758a83054ab06d68ae1f1f293.png

The issue of same value by two users would be handled through the key as UNIQUEID()

View solution in original post

2 REPLIES 2
Top Labels in this Space