Custom Auto Numbering Function
Hi! New Smartsheet user here, appreciate any help and guidance. I'm looking to create a formula to build a custom auto-number function. I'm including a screenshot for reference. I'd like to automate the Project ID column. Where the project ID is YEAR - CLIENT - CLIENT PROJECT NUMBER.
Is there a formula out there that would work for this? Thank you very much for taking the time to review.
Best Answer
-
You would just need to rearrange the sections.
You can see in the formula there are two instances of
+ "-" +
Those are your delimiters. Everything to the left of the first one is what outputs the "R". Everything to the right of the second one outputs the "20", and everything in between outputs the count.
So right now the formula is going
left + "-" + middle + "-" + right
You want
right + "-" + left + "-" + middle
Answers
-
You are going to need to insert an auto-number column with no special formatting.
Then you can use this:
=RIGHT(YEAR([Start Date]@row), 2) + "-" + Client@row + "-" + COUNTIFS([Auto number]:[Auto Number], @cell<= [Auto Number]@row)
-
Thank you! I actually just stumbled across another one or your helpful responses here: https://community.smartsheet.com/discussion/69133/custom-auto-number
This is exactly what I'm looking to do but now I'm just trying to tweak the formula so it goes Year - Project Class - Unique Number. So Instead of R-1-20 it'd be 20-R-1
=LEFT([Project Class]@row + "-" + COUNTIFS([Project Class]$1:[Project Class]@row, [Project Class]@row, [Start Date]$1:[Start Date]@row, YEAR(@cell) = YEAR([Start Date]@row)) + "-" + RIGHT(YEAR([Start Date]@row), 2)
-
You would just need to rearrange the sections.
You can see in the formula there are two instances of
+ "-" +
Those are your delimiters. Everything to the left of the first one is what outputs the "R". Everything to the right of the second one outputs the "20", and everything in between outputs the count.
So right now the formula is going
left + "-" + middle + "-" + right
You want
right + "-" + left + "-" + middle
-
Thank you!! It worked :)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67K Get Help
- 441 Global Discussions
- 154 Industry Talk
- 502 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 79 Community Job Board
- 512 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 307 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!