I'm making a task tracker in Google Sheets and am trying to implement subtasks.
I am trying to create a formula that checks a row's "Parent Task" column, and if there is a parent task, indents the row's "Task Name" column. Then, the formula looks up the Parent Task identified and if that task also has a parent task, then it indents the "Task Name" a second time. The process repeats until the parent task has no parent tasks itself.
This is the effect I'm trying to achieve:
This is my formula so far, which works well except it's not recursive (the indentation only occurs once regardless of how many ancestors the task has).
=IF(ISBLANK(C3), B3, CONCAT(" ", B3))