Hi
I have below table
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD="align: center"]AT[/TD]
[TD="align: center"]PT[/TD]
[TD="align: center"]FT[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]12[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]22[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
I want to find smallest PT that AT belonged PT <= FT ,
then founded PT + FT(old)=FT(new)
and founded PT ignore in next row calculation,
and repeat trend in every row whit excel function.
for example
FT=12
AT<=12:{8,10,12}
PT: {6,2,4}
FT(new)=2+12=14
FT=14
AT:{8,12,13}
PT:{6,4,3}
FT(new)=3+14=17
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD="align: center"]AT[/TD]
[TD="align: center"]PT[/TD]
[TD="align: center"]FT[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]12[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]14[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]17[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]22[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
I have below table
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD="align: center"]AT[/TD]
[TD="align: center"]PT[/TD]
[TD="align: center"]FT[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]12[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]22[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
I want to find smallest PT that AT belonged PT <= FT ,
then founded PT + FT(old)=FT(new)
and founded PT ignore in next row calculation,
and repeat trend in every row whit excel function.
for example
FT=12
AT<=12:{8,10,12}
PT: {6,2,4}
FT(new)=2+12=14
FT=14
AT:{8,12,13}
PT:{6,4,3}
FT(new)=3+14=17
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD="align: center"]AT[/TD]
[TD="align: center"]PT[/TD]
[TD="align: center"]FT[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]12[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]14[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]17[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]22[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]