Hello guys:
I have a list of models which consists of a code (alphabetical) and an ID (which start from 100), hyphen-separated.
I need to calculate the immediate next ID to assign by code following this rule:
- if the model exists, the first ID which is missing in the sequence starting at 100, incremented by 1 (if there are existing models with 100,101,103, then 102 is missing, so 102 shall be returned)
- if the model does not exist, shall return 100
There are duplicates models which is normal. We need a formula we can drag down.
Any ideas? Thanks.
generate next id.jpg
Bookmarks