Hi,
I have two columns with Entry no and TRansferred from entry no and would need to calculate a column Expected initial Entry no, that brings the initial entry no if an item has transferred ( it's differnt than zero).
It is easy to bring the value if we have one transfer for example entry 2 but I couldnt find a solution where you have multiple transfers. Eg. entry no 5, the initial entry no is 1.
[TABLE="width: 708"]
<tbody>[TR]
[TD]Entry no
[/TD]
[TD]Transferred from entry no
[/TD]
[TD]Expected result initial entry
[/TD]
[TD]Comment how expected should work
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]0
[/TD]
[TD]1
[/TD]
[TD]Entry no is 1 and it's transferred from 0 then bring Entry no 1
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]Entry no 2 is coming from entry no 1, and entry no 1 is transferred from zero than bring 1
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]0
[/TD]
[TD]3
[/TD]
[TD]Entry no 3 is transferred from 0 then bring Entry no 3
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]2
[/TD]
[TD]1
[/TD]
[TD]Entry no 4 is transferred from 2, and 2 it's transferred from 1, and 1 is transferred from 0, then bring 1
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]4
[/TD]
[TD]1
[/TD]
[TD]Entry no 5 is transferred from 4, and 4 it's transferred from 2, 2 is transferred from 1 and 1 is transferred from 0, then bring 1
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]5
[/TD]
[TD]1
[/TD]
[TD]Entry no 6 is transferred from 5, and 5 is transferred from 4, 4 is transferred from 2, 2 from 1 and 1 from 0 then 1
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]0
[/TD]
[TD]7
[/TD]
[TD]Entry 7 is transferred from 0 then bring Entry no 7
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]4
[/TD]
[TD]1
[/TD]
[TD]Entry no 8 is transferred from 4, and 4 it's transferred from 2, 2 is transferred from 1 and 1 is transferred from 0, then bring 1
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]Entry no 9 is transferred from 1, 1 is tranferred from zero then bring 1
[/TD]
[/TR]
</tbody>[/TABLE]
Any help would be much appreciated.
I have two columns with Entry no and TRansferred from entry no and would need to calculate a column Expected initial Entry no, that brings the initial entry no if an item has transferred ( it's differnt than zero).
It is easy to bring the value if we have one transfer for example entry 2 but I couldnt find a solution where you have multiple transfers. Eg. entry no 5, the initial entry no is 1.
[TABLE="width: 708"]
<tbody>[TR]
[TD]Entry no
[/TD]
[TD]Transferred from entry no
[/TD]
[TD]Expected result initial entry
[/TD]
[TD]Comment how expected should work
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]0
[/TD]
[TD]1
[/TD]
[TD]Entry no is 1 and it's transferred from 0 then bring Entry no 1
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]Entry no 2 is coming from entry no 1, and entry no 1 is transferred from zero than bring 1
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]0
[/TD]
[TD]3
[/TD]
[TD]Entry no 3 is transferred from 0 then bring Entry no 3
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]2
[/TD]
[TD]1
[/TD]
[TD]Entry no 4 is transferred from 2, and 2 it's transferred from 1, and 1 is transferred from 0, then bring 1
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]4
[/TD]
[TD]1
[/TD]
[TD]Entry no 5 is transferred from 4, and 4 it's transferred from 2, 2 is transferred from 1 and 1 is transferred from 0, then bring 1
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]5
[/TD]
[TD]1
[/TD]
[TD]Entry no 6 is transferred from 5, and 5 is transferred from 4, 4 is transferred from 2, 2 from 1 and 1 from 0 then 1
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]0
[/TD]
[TD]7
[/TD]
[TD]Entry 7 is transferred from 0 then bring Entry no 7
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]4
[/TD]
[TD]1
[/TD]
[TD]Entry no 8 is transferred from 4, and 4 it's transferred from 2, 2 is transferred from 1 and 1 is transferred from 0, then bring 1
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]Entry no 9 is transferred from 1, 1 is tranferred from zero then bring 1
[/TD]
[/TR]
</tbody>[/TABLE]
Any help would be much appreciated.