Please, I have a data sample bellow. row2 to row22 contain debtors details in while row28 to row30 contains just the debtors list with the terminated period. I want to get a report that will filter the periods and the corresponding amount from 2009/2010 to the terminated period as contained in C28 - C31.
[TABLE="class: grid, width: 539"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD] [/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]idnumber[/TD]
[TD]name[/TD]
[TD]semester[/TD]
[TD]period[/TD]
[TD]amount[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]01/5777/RE[/TD]
[TD]IKERIONWU OSI D[/TD]
[TD]First Semester[/TD]
[TD]2009/2010[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]01/5777/RE[/TD]
[TD]IKERIONWU OSI D[/TD]
[TD]First Semester[/TD]
[TD]2010/2011[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]01/5777/RE[/TD]
[TD]IKERIONWU OSI D[/TD]
[TD]Second Semester[/TD]
[TD]2010/2011[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]01/5777/RE[/TD]
[TD]IKERIONWU OSI D[/TD]
[TD]First Semester[/TD]
[TD]2011/2012[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]01/5777/RE[/TD]
[TD]IKERIONWU OSI D[/TD]
[TD]Second Semester[/TD]
[TD]2011/2012[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]01/5777/RE[/TD]
[TD]IKERIONWU OSI D[/TD]
[TD]First Semester[/TD]
[TD]2012/2013[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD]01/5777/RE[/TD]
[TD]IKERIONWU OSI D[/TD]
[TD]Second Semester[/TD]
[TD]2012/2013[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD]01/5873/UE[/TD]
[TD]UNUODE J AUSTINE[/TD]
[TD]Second Semester[/TD]
[TD]2009/2010[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD]01/5873/UE[/TD]
[TD]UNUODE J AUSTINE[/TD]
[TD]First Semester[/TD]
[TD]2010/2011[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD]01/5873/UE[/TD]
[TD]UNUODE J AUSTINE[/TD]
[TD]Second Semester[/TD]
[TD]2010/2011[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD]01/5873/UE[/TD]
[TD]UNUODE J AUSTINE[/TD]
[TD]First Semester[/TD]
[TD]2011/2012[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]13[/TD]
[TD]01/5873/UE[/TD]
[TD]UNUODE J AUSTINE[/TD]
[TD]Second Semester[/TD]
[TD]2011/2012[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD]01/5873/UE[/TD]
[TD]UNUODE J AUSTINE[/TD]
[TD]First Semester[/TD]
[TD]2012/2013[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD]01/5873/UE[/TD]
[TD]UNUODE J AUSTINE[/TD]
[TD]Second Semester[/TD]
[TD]2012/2013[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]16[/TD]
[TD]01/5938/UE[/TD]
[TD]IDOKO I SOLOMON[/TD]
[TD]Second Semester[/TD]
[TD]2009/2010[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]17[/TD]
[TD]01/5938/UE[/TD]
[TD]IDOKO I SOLOMON[/TD]
[TD]First Semester[/TD]
[TD]2010/2011[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]18[/TD]
[TD]01/5938/UE[/TD]
[TD]IDOKO I SOLOMON[/TD]
[TD]Second Semester[/TD]
[TD]2010/2011[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]19[/TD]
[TD]01/5938/UE[/TD]
[TD]IDOKO I SOLOMON[/TD]
[TD]First Semester[/TD]
[TD]2011/2012[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD]01/5938/UE[/TD]
[TD]IDOKO I SOLOMON[/TD]
[TD]Second Semester[/TD]
[TD]2011/2012[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]21[/TD]
[TD]01/5938/UE[/TD]
[TD]IDOKO I SOLOMON[/TD]
[TD]First Semester[/TD]
[TD]2012/2013[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]22[/TD]
[TD]01/5938/UE[/TD]
[TD]IDOKO I SOLOMON[/TD]
[TD]Second Semester[/TD]
[TD]2012/2013[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]23[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]24[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]26[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]27[/TD]
[TD]idnumber[/TD]
[TD]name[/TD]
[TD]periodterminated[/TD]
[TD]report[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]28[/TD]
[TD]01/5938/UE[/TD]
[TD]IDOKO I SOLOMON[/TD]
[TD]2011/2012[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]29[/TD]
[TD]01/5777/RE[/TD]
[TD]IKERIONWU OSI D[/TD]
[TD]2009/2010[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]30[/TD]
[TD]01/5873/UE[/TD]
[TD]UNUODE J AUSTINE[/TD]
[TD]2012/2013[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]31[/TD]
[TD]01/5943/RE[/TD]
[TD]KALU KALU T[/TD]
[TD]2009/2010[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
Please, this is how i want the report to look like.
if A28 IS FOUND IN A2:D22 then return the corresponding of column E matching c28 (which is 2011/2012) backward using "()" for the amount due and "," as session separator
Example: in column D28 I should have the following report as below
2011/2012(4000), 2011/2012(17700), 2010/2011(4000), 2010/2011(17700), 2009/2010(4000).
I will so much appreciate if you guys can give me a solution.
[TABLE="class: grid, width: 539"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD] [/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]idnumber[/TD]
[TD]name[/TD]
[TD]semester[/TD]
[TD]period[/TD]
[TD]amount[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]01/5777/RE[/TD]
[TD]IKERIONWU OSI D[/TD]
[TD]First Semester[/TD]
[TD]2009/2010[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]01/5777/RE[/TD]
[TD]IKERIONWU OSI D[/TD]
[TD]First Semester[/TD]
[TD]2010/2011[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]01/5777/RE[/TD]
[TD]IKERIONWU OSI D[/TD]
[TD]Second Semester[/TD]
[TD]2010/2011[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]01/5777/RE[/TD]
[TD]IKERIONWU OSI D[/TD]
[TD]First Semester[/TD]
[TD]2011/2012[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]01/5777/RE[/TD]
[TD]IKERIONWU OSI D[/TD]
[TD]Second Semester[/TD]
[TD]2011/2012[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]01/5777/RE[/TD]
[TD]IKERIONWU OSI D[/TD]
[TD]First Semester[/TD]
[TD]2012/2013[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD]01/5777/RE[/TD]
[TD]IKERIONWU OSI D[/TD]
[TD]Second Semester[/TD]
[TD]2012/2013[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD]01/5873/UE[/TD]
[TD]UNUODE J AUSTINE[/TD]
[TD]Second Semester[/TD]
[TD]2009/2010[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD]01/5873/UE[/TD]
[TD]UNUODE J AUSTINE[/TD]
[TD]First Semester[/TD]
[TD]2010/2011[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD]01/5873/UE[/TD]
[TD]UNUODE J AUSTINE[/TD]
[TD]Second Semester[/TD]
[TD]2010/2011[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD]01/5873/UE[/TD]
[TD]UNUODE J AUSTINE[/TD]
[TD]First Semester[/TD]
[TD]2011/2012[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]13[/TD]
[TD]01/5873/UE[/TD]
[TD]UNUODE J AUSTINE[/TD]
[TD]Second Semester[/TD]
[TD]2011/2012[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD]01/5873/UE[/TD]
[TD]UNUODE J AUSTINE[/TD]
[TD]First Semester[/TD]
[TD]2012/2013[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD]01/5873/UE[/TD]
[TD]UNUODE J AUSTINE[/TD]
[TD]Second Semester[/TD]
[TD]2012/2013[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]16[/TD]
[TD]01/5938/UE[/TD]
[TD]IDOKO I SOLOMON[/TD]
[TD]Second Semester[/TD]
[TD]2009/2010[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]17[/TD]
[TD]01/5938/UE[/TD]
[TD]IDOKO I SOLOMON[/TD]
[TD]First Semester[/TD]
[TD]2010/2011[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]18[/TD]
[TD]01/5938/UE[/TD]
[TD]IDOKO I SOLOMON[/TD]
[TD]Second Semester[/TD]
[TD]2010/2011[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]19[/TD]
[TD]01/5938/UE[/TD]
[TD]IDOKO I SOLOMON[/TD]
[TD]First Semester[/TD]
[TD]2011/2012[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD]01/5938/UE[/TD]
[TD]IDOKO I SOLOMON[/TD]
[TD]Second Semester[/TD]
[TD]2011/2012[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]21[/TD]
[TD]01/5938/UE[/TD]
[TD]IDOKO I SOLOMON[/TD]
[TD]First Semester[/TD]
[TD]2012/2013[/TD]
[TD="align: right"]17700[/TD]
[/TR]
[TR]
[TD="align: right"]22[/TD]
[TD]01/5938/UE[/TD]
[TD]IDOKO I SOLOMON[/TD]
[TD]Second Semester[/TD]
[TD]2012/2013[/TD]
[TD="align: right"]4000[/TD]
[/TR]
[TR]
[TD="align: right"]23[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]24[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]26[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]27[/TD]
[TD]idnumber[/TD]
[TD]name[/TD]
[TD]periodterminated[/TD]
[TD]report[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]28[/TD]
[TD]01/5938/UE[/TD]
[TD]IDOKO I SOLOMON[/TD]
[TD]2011/2012[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]29[/TD]
[TD]01/5777/RE[/TD]
[TD]IKERIONWU OSI D[/TD]
[TD]2009/2010[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]30[/TD]
[TD]01/5873/UE[/TD]
[TD]UNUODE J AUSTINE[/TD]
[TD]2012/2013[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]31[/TD]
[TD]01/5943/RE[/TD]
[TD]KALU KALU T[/TD]
[TD]2009/2010[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
Please, this is how i want the report to look like.
if A28 IS FOUND IN A2:D22 then return the corresponding of column E matching c28 (which is 2011/2012) backward using "()" for the amount due and "," as session separator
Example: in column D28 I should have the following report as below
2011/2012(4000), 2011/2012(17700), 2010/2011(4000), 2010/2011(17700), 2009/2010(4000).
I will so much appreciate if you guys can give me a solution.