AutoNumbering

Options

Can I still use the autonumbering feature for my projects but I only want it to count the Parent Tasks and not count the subtasks? If not, do I have to count manually??

Best Answer

  • KPH
    KPH ✭✭✭✭✭✭
    Answer ✓
    Options

    Your call @Roxanne Basgen !

    It depends on what you are using these numbers for. If the number must be fixed to the row and not changed when new rows are added then I would stick to just auto number and either number all the rows or add the second column to only show the numbers on the parent rows. If you want the numbers to be more like a row number and always run sequentially, changing when new rows are added in the middle, then the three step process is the way to go.

    Have fun!

Answers

  • Mark.poole
    Mark.poole ✭✭✭✭✭✭
    edited 06/25/24
    Options

    @Roxanne Basgen

    Create an auto number column that you can hide if you want then do in another column that will be your visible auto number

    =countifs(auto:auto, >=auto@row, task:task, count(ancestors()) > 0)

    Where auto is what ever auto number column your using and task is what ever you have your task column named as.

    If you found this comment helpful. Please respond with any of the buttons below. Awesome🖤, Insightful💡, Upvote⬆️, or accepted answer. Not only will this help others searching for the same answer, but help me as well. Thank you.

  • KPH
    KPH ✭✭✭✭✭✭
    Options

    The autonumber column will number every row. Assigning a number to only parent rows is possible but you will need a few columns (which you can hide).

    Step 1

    Create a normal auto number column - this will number every row

    Your sheet will look something like this

    Step 2

    Create a column to return the auto numbers for parents only

    This formula will return the value in the Auto Number column if the count of descendants is greater than 0 (in other words - they have children and are therefore parents)

    =IF(COUNT(DESCENDANTS(Task@row)) > 0, [Auto Number]@row)

    Your sheet will not look something like this

    Step 3

    Create another column

    Use the RANKQ formula to scan the list of values in the "Auto Number Parent Only" column return the relative position of the value in the current row.

    =IFERROR(RANKEQ([Auto Number Parents Only]@row, [Auto Number Parents Only]:[Auto Number Parents Only], 1), "")

    Number 1 is first, 4 is second, 8 is third. So your sheet will look something like this

    Step 4

    You can tidy this up by converting the formulas to column formulas and hiding the middle two columns.

    Note

    There is a caveat you should be aware of:

    If you add new parent rows to the bottom of the sheet, the Number for Parents Only will continue to increase nicely.

    If you add another parent row in the middle of the list, the number will again be the next in the list as this new row will be issued a new auto number.

    But if you change a child row into a parent row, it will already have an auto number so it's parent only auto number will not be the next one in the list, and any rows below it will be issued with revised auto numbers.

  • Wow, thank you to both! @KPH, hmmmm sounds like I should just stick to autonumbering all tasks :-)

  • KPH
    KPH ✭✭✭✭✭✭
    Answer ✓
    Options

    Your call @Roxanne Basgen !

    It depends on what you are using these numbers for. If the number must be fixed to the row and not changed when new rows are added then I would stick to just auto number and either number all the rows or add the second column to only show the numbers on the parent rows. If you want the numbers to be more like a row number and always run sequentially, changing when new rows are added in the middle, then the three step process is the way to go.

    Have fun!