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
- 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
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 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!