How can I create an autonumber field that only increases when the column "Hierarchy" = 0?
Options

Peace
ββ
What I have tried so far but is not working:
- =IF([Hierarchy] = 0, MAX((IF([@[Hierarchy]] = 0, [@[AutoNumber]]))) + 1, "")
- =IF([Hierarchy]@row = 0, COUNTIFS([Hierarchy]:[Hierarchy], 0, ROW([Hierarchy])@row , "<=" & ROW()), "")
- =IF([Hierarchy@row ] = 0, COUNTA([Hierarchy@row ]) + 1, "")
Tags:
Answers
-
OP: Ideally I would want to add the autonumber to a prefix but I could add a concatenate formula to it afterward.
-
You would first insert an auto-number column (called "Auto" in this example and formatting doesn't matter). Then a text/number column called "Row" with this column formula:
=MATCH(Auto@row, Auto:Auto, 0)
Then in the column you want the incrementing number to be in, you would use
=IF(Hierarchy@row = 0, COUNTIFS(Hierarchy:Hierarchy, Row:Row, @cell <= Row@row))
Help Article Resources
Categories
Want to practice working with formulas directly in Smartsheet?
Check out the Formula Handbook template!
Check out the Formula Handbook template!