Sequential numbering based on information in another column
I'm trying to create a formula (preferably one that can be converted into a column formula) that will generate a sequential Change Order Number based on the position and number of times the Contract # is used in my sheet. I'm attaching a screenshot of what I need the finished product to look like. I'm sure I will need an auto number row in here somewhere and probably a helper column but this one's got me scratching my head.
Thanks for any help!
Tags:
Best Answer
-
="CO-0" + COUNTIF([Contact #]$1:[Contact #]2, [Contact #]@row) + "-" + [Contact #]@row
Some notes:
- You need to drag the formula from top. Start of range is anchored to Row 1, and End of range is range at row.
- The serial CO-0 will need a bit of tweaking to count with leading zeroes.
Here's with the flexible leading zeroes up to 999
="CO-" + IF(COUNTIF([Contact #]$1:[Contact #]1, [Contact #]@row) < 10, "00", IF(COUNTIF([Contact #]$1:[Contact #]1, [Contact #]@row) < 99, "0", "")) + COUNTIF([Contact #]$1:[Contact #]1, [Contact #]@row) + "-" + [Contact #]@row
...
Answers
-
="CO-0" + COUNTIF([Contact #]$1:[Contact #]2, [Contact #]@row) + "-" + [Contact #]@row
Some notes:
- You need to drag the formula from top. Start of range is anchored to Row 1, and End of range is range at row.
- The serial CO-0 will need a bit of tweaking to count with leading zeroes.
Here's with the flexible leading zeroes up to 999
="CO-" + IF(COUNTIF([Contact #]$1:[Contact #]1, [Contact #]@row) < 10, "00", IF(COUNTIF([Contact #]$1:[Contact #]1, [Contact #]@row) < 99, "0", "")) + COUNTIF([Contact #]$1:[Contact #]1, [Contact #]@row) + "-" + [Contact #]@row
...
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.8K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 440 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 284 Events
- 33 Webinars
- 7.3K Forum Archives
Want to practice working with formulas directly in Smartsheet?
Check out the Formula Handbook template!
Check out the Formula Handbook template!