Hi
I cannot post any attachments so I cannot share the sample data I made. I copied it below. The formatting is off. Hopefully you can still understand the sample.
I have a job matrix that shows staff movement. The table is read as follows. There were 22 people from job B that moved into job A. There were 3 people in job C that moved into job A. The percentage is based on the to job. I need to know the top three "FROM JOBS" that moved into each "TO JOB". This is shown in the expected outcome. In addition to the job, I also need to know the corresponding %.
Any ideas on how to do this?
Thanks in advance!
[TABLE="width: 1088"]
<tbody>[TR]
[TD="colspan: 17, align: center"]SOURCE DATA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 3"]STAFF MOVEMENT COUNTS[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 5"]STAFF MOVEMENT PERCENTAGE OF "TO JOB"[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 6"]FROM JOB
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 6"]FROM JOB
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]TOTAL[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]TOTAL[/TD]
[/TR]
[TR]
[TD]TO JOB
[/TD]
[TD]A
[/TD]
[TD]1[/TD]
[TD]22[/TD]
[TD]3[/TD]
[TD]0[/TD]
[TD]19[/TD]
[TD="align: right"]45[/TD]
[TD][/TD]
[TD]TO JOB
[/TD]
[TD]A
[/TD]
[TD]2%
[/TD]
[TD]49%[/TD]
[TD]7%[/TD]
[TD]0%[/TD]
[TD]42%[/TD]
[TD="align: right"]100%[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]7[/TD]
[TD]9[/TD]
[TD]3[/TD]
[TD="align: right"]19[/TD]
[TD][/TD]
[TD]B
[/TD]
[TD]0%[/TD]
[TD]0%[/TD]
[TD]37%[/TD]
[TD]47%[/TD]
[TD]16%[/TD]
[TD="align: right"]100%[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]7[/TD]
[TD="align: right"]15[/TD]
[TD][/TD]
[TD]C[/TD]
[TD]20%[/TD]
[TD]20%[/TD]
[TD]13%[/TD]
[TD]0%[/TD]
[TD]47%[/TD]
[TD="align: right"]100%[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]7[/TD]
[TD]35[/TD]
[TD="align: right"]46[/TD]
[TD][/TD]
[TD]D[/TD]
[TD]4%[/TD]
[TD]2%[/TD]
[TD]2%[/TD]
[TD]15%[/TD]
[TD]76%[/TD]
[TD="align: right"]100%[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD="align: right"]3[/TD]
[TD][/TD]
[TD]E[/TD]
[TD]33%[/TD]
[TD]67%[/TD]
[TD]0%[/TD]
[TD]0%[/TD]
[TD]0%[/TD]
[TD="align: right"]100%[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 17, align: center"]EXPECTED OUTCOME[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 3"]TOP THREE IN TERMS OF JOB[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]TOP THREE IN TERMS OF %[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]TOP 3 FROM JOB
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]TOP 3 FROM JOB
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TO JOB
[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]E[/TD]
[TD]C[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]TO JOB
[/TD]
[TD]A[/TD]
[TD]49%[/TD]
[TD]42%[/TD]
[TD]7%[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]D[/TD]
[TD]C[/TD]
[TD]E[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]B
[/TD]
[TD]47%[/TD]
[TD]37%[/TD]
[TD]16%[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]E[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]C[/TD]
[TD]47%[/TD]
[TD]20%[/TD]
[TD]20%[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]E[/TD]
[TD]D[/TD]
[TD]A[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]D[/TD]
[TD]76%[/TD]
[TD]15%[/TD]
[TD]4%[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]B[/TD]
[TD]A[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]E[/TD]
[TD]67%[/TD]
[TD]33%[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I cannot post any attachments so I cannot share the sample data I made. I copied it below. The formatting is off. Hopefully you can still understand the sample.
I have a job matrix that shows staff movement. The table is read as follows. There were 22 people from job B that moved into job A. There were 3 people in job C that moved into job A. The percentage is based on the to job. I need to know the top three "FROM JOBS" that moved into each "TO JOB". This is shown in the expected outcome. In addition to the job, I also need to know the corresponding %.
Any ideas on how to do this?
Thanks in advance!
[TABLE="width: 1088"]
<tbody>[TR]
[TD="colspan: 17, align: center"]SOURCE DATA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 3"]STAFF MOVEMENT COUNTS[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 5"]STAFF MOVEMENT PERCENTAGE OF "TO JOB"[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 6"]FROM JOB
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 6"]FROM JOB
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]TOTAL[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]TOTAL[/TD]
[/TR]
[TR]
[TD]TO JOB
[/TD]
[TD]A
[/TD]
[TD]1[/TD]
[TD]22[/TD]
[TD]3[/TD]
[TD]0[/TD]
[TD]19[/TD]
[TD="align: right"]45[/TD]
[TD][/TD]
[TD]TO JOB
[/TD]
[TD]A
[/TD]
[TD]2%
[/TD]
[TD]49%[/TD]
[TD]7%[/TD]
[TD]0%[/TD]
[TD]42%[/TD]
[TD="align: right"]100%[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]7[/TD]
[TD]9[/TD]
[TD]3[/TD]
[TD="align: right"]19[/TD]
[TD][/TD]
[TD]B
[/TD]
[TD]0%[/TD]
[TD]0%[/TD]
[TD]37%[/TD]
[TD]47%[/TD]
[TD]16%[/TD]
[TD="align: right"]100%[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]7[/TD]
[TD="align: right"]15[/TD]
[TD][/TD]
[TD]C[/TD]
[TD]20%[/TD]
[TD]20%[/TD]
[TD]13%[/TD]
[TD]0%[/TD]
[TD]47%[/TD]
[TD="align: right"]100%[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]7[/TD]
[TD]35[/TD]
[TD="align: right"]46[/TD]
[TD][/TD]
[TD]D[/TD]
[TD]4%[/TD]
[TD]2%[/TD]
[TD]2%[/TD]
[TD]15%[/TD]
[TD]76%[/TD]
[TD="align: right"]100%[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD="align: right"]3[/TD]
[TD][/TD]
[TD]E[/TD]
[TD]33%[/TD]
[TD]67%[/TD]
[TD]0%[/TD]
[TD]0%[/TD]
[TD]0%[/TD]
[TD="align: right"]100%[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 17, align: center"]EXPECTED OUTCOME[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 3"]TOP THREE IN TERMS OF JOB[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]TOP THREE IN TERMS OF %[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]TOP 3 FROM JOB
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]TOP 3 FROM JOB
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TO JOB
[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]E[/TD]
[TD]C[/TD]
[TD][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