How to recursively append cells?

excel, excel-formula

Solution

Assuming your data start in cell A3:

=IF(B4=A4,C4,VLOOKUP(B4,$A$3:$D$5,4)&C4)

You'll have to expand `$A$3:$D$5` to the size of your data array.

Problem

I have an Excel sheet that looks like this: ``` |A B C D ----------------------------------------------------------------------------------- 1 |ID PARENTID VALUE RESOLVED VALUE (how to generate this?) =================================================================================== 2 |0 0 /root /root 3 |1 0 /one /root/one 4 |2 0 /two /root/two 5 |3 0 /three /root/three 6 |4 3 /child-one-of-three /root/three/child-one-of-three 7 |5 3 /child-two-of-three /root/three/child-two-of-three ``` Each row has an `ID` and a `PARENTID`. I want to generate the content of the last column, `RESOLVED VALUE` by resursively appending the `VALUE` of each row. How can I do this in Excel?

Original source

Related problems