Auto-Numbering Parents, But Not Children
![Nicole J](https://us.v-cdn.net/6031209/uploads/defaultavatar/nWRMFRX6I99I6.jpg)
I need to set up a means of having "auto numbers" (use the next number in the sequence) for "parent rows", but not "children rows". Is this possible?
Best Answers
-
Hi @Nicole J
[ANC] =COUNT(ANCESTORS()) [PAN] =IF(ANC@row = 0, MATCH([Row ID]@row, COLLECT([Row ID]:[Row ID], ANC:ANC, 0), 0))
(Link to the published demo sheet)
-
Hi @Nicole J
The solution below uses sheet summary fields, but you can replace them with the actual values.
=Prefix# + "-" + RIGHT([Zero Sup]# + [Parent Auto Number]@row, [ZS Len]#) + Suffix#
We can use the RIGHT function for zero suppression.
Answers
-
Hi @Nicole J
[ANC] =COUNT(ANCESTORS()) [PAN] =IF(ANC@row = 0, MATCH([Row ID]@row, COLLECT([Row ID]:[Row ID], ANC:ANC, 0), 0))
(Link to the published demo sheet)
-
Thank you, so much!! This works great. Can you help me out with the [PAN] formula to:
- auto-lead with "Client - "
- display in six digits (000001, 000002, 000003, etc.)
So the [PAN] would spit out: Client - 000001, Client - 000002, Client - 000003, etc.
Many thanks.
-
Hi @Nicole J
The solution below uses sheet summary fields, but you can replace them with the actual values.
=Prefix# + "-" + RIGHT([Zero Sup]# + [Parent Auto Number]@row, [ZS Len]#) + Suffix#
We can use the RIGHT function for zero suppression.
-
Bingo. Thank you.
-
Happy to help!😁
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.2K Get Help
- 360 Global Discussions
- 198 Industry Talk
- 427 Announcements
- 4.4K Ideas & Feature Requests
- 136 Brandfolder
- 127 Just for fun
- 128 Community Job Board
- 444 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!