Is there a way to reference the row above?

I'm trying to mark active child tasks in an overall task. I'd like do =IF(Done@row-1 = 1, 1, 0) in the Active Task column, but we often insert tasks and I don't want to put a hard @row number in there that would need to be maintained when new tasks are added. Same for automatic numbers in a RowID column.

I was also doing this based on status, but we have several subtasks that have the same status and we only want to add additional status' as a last resort.

Does anyone know of a way to do this with Ancestors or a helper column to show when the task above is complete and that is now the active task?



Best Answer

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    Insert an auto-number column (called "Auto) that has no special formatting.

    Next insert a text/number column (called "Row") with the following column formula:

    =MATCH(Auto@row, Auto:Auto, 0)


    Then you can incorporate this into your formula

    Row@row - 1 will always give the row above regardless of sorting, deleting, or adding rows.

    Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!

    CERTIFIED SMARTSHEET PLATINUM PARTNER

    10xViz.com

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!