# Auto-Number based on year

Options
✭✭✭✭✭

The auto-numbering system is not always the most helpful I have learned. Can anyone assist with this formula which first takes a look at the date raised column to identify the first two parts but I want the last part to number with the next number in the sequence based on the year.

```=IFERROR(YEAR([Date Raised]@row) + "-" + RIGHT("0" + MONTH([Date Raised]@row), 2) + "-" + IFERROR(MATCH([Row ID]@row, COLLECT([Row ID]:[Row ID], [Date Raised]:[Date Raised], YEAR([Date Raised]@row), 0), ""), ""))
```

• ✭✭✭✭✭✭
Options

Are you able to provide a screenshot for context?

• ✭✭✭✭✭
Options
• ✭✭✭✭✭✭
Options

Give this a try… Start with changing the format of the [Row ID] column to just be plain numbers (no zero filling).

Then you can use this formula in the [Risk Identifier] column:

YEAR([Date Raised]@row) + "-" + RIGHT("0" + MONTH([Date Raised]@row), 2) + "-" + RIGHT("000" + COUNTIFS([Date Raised]:[Date Raised], IFERROR(YEAR(@cell), 0) = YEAR([Date Raised]@row), [Row ID]:[Row ID], @cell <= [Row ID]@row), 4)

• ✭✭✭✭✭
Options

That worked, thank you! I have a few other questions about this same table that I will be posting here shortly. I am trying to recreate a presentation to auto-spit out from smartsheet.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!