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.5K Get Help
- 424 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 145 Just for fun
- 62 Community Job Board
- 465 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 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!