Can the auto-numbering function be set up to utilize new numbering prefix at start of each year?
I created a sheet that uses auto-numbering to assign a number to all submitted forms. I want the numbering to utilize a prefix denoting the year and start over at 0 each year. For example the numbering of the submissions in year 2021 will start with 2021-01 continuing with 2021-02, 2021-03, etc. When the year 2022 is reached, I would like any new requests to use a 2022 prefix (e.g. 2022-01, 2022-02,...). Is there a way to set this up?
Answers
-
The auto-number feature can't do that, but you could use a formula.
Insert a column to track the submitted date (Created Date column) and then in a text/number column use something like this...
=YEAR(Created@row) + "-" + COUNTIFS(Created:Created, AND(@cell <= Created@row, IFERROR(YEAR(@cell), 0) = YEAR(Created@row)))
-
Thanks for the formula for this! I was able to restart numbering for each year based on 'create' field. I have 2 follow-up questions:
- The formula works if you don't have mulitple items that show created at same date/time - because of the 'countifs' formula, it does not count it as unique - anyway to adjust the formula to avoid this?
- How do i format the result to be 2024-001 vs. 2024-1 so that when it's sorted, the numbers fall in line?
Thanks!
-
@joseply_68 You can insert an auto-number column that has no special formatting and leverage that. A RIGHT function will take care of the zero-filling.
=YEAR(Created@row) + "-" + RIGHT("000" + COUNTIFS(Created:Created, IFERROR(YEAR(@cell), 0) = YEAR(Created@row), [Auto-Number]:[Auto-Number], @cell<= [Auto-Number]@row), 3)
-
Hi - I'm using the formula that uses the auto-number column and I keep getting an "UNPARSEABLE" error. How should the columns be laid out and titled for this formula to work? Thank you!
-
@Murz Screenshots would help troubleshoot this. That particular error can come from a wide array of issues.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.1K Get Help
- 412 Global Discussions
- 221 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 461 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!