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
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!