Excel 2010[TABLE="class: grid, width: 500"]
<colgroup><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: right"]600[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: right"]606[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: right"]610[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: right"]660[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]45[/TD]
[TD="align: right"]56[/TD]
[TD="align: right"]63[/TD]
[TD="align: right"]76[/TD]
[TD="align: right"]80[/TD]
[TD="align: right"]80[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: right"]670[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]31[/TD]
[TD="align: right"]39[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]55[/TD]
[TD="align: right"]66[/TD]
[TD="align: right"]69[/TD]
[TD="align: right"]69[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: right"]960[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]28[/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]43[/TD]
[TD="align: right"]56[/TD]
[TD="align: right"]68[/TD]
[TD="align: right"]72[/TD]
[TD="align: right"]72[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD]new table[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: right"]660[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]45[/TD]
[TD="align: right"]56[/TD]
[TD="align: right"]63[/TD]
[TD="align: right"]76[/TD]
[TD="align: right"]80[/TD]
[TD="align: right"]80[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: right"]670[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]31[/TD]
[TD="align: right"]39[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]55[/TD]
[TD="align: right"]66[/TD]
[TD="align: right"]69[/TD]
[TD="align: right"]69[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: right"]960[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]28[/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]43[/TD]
[TD="align: right"]56[/TD]
[TD="align: right"]68[/TD]
[TD="align: right"]72[/TD]
[TD="align: right"]72[/TD]
[/TR]
</tbody>[/TABLE]
Sheet4
[TABLE="width: 85%"]
<tbody>[TR]
[TD]
Array Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]A9[/TH]
[TD="align: left"]{=IF(
ROWS($A$9:A9)>COUNTIF($J$1:$J$6,">0"),"",INDEX(A$1:A$6,SMALL(IF($J$1:$J$6>0,ROW($J$1:$J$6)-ROW($J$1)+1),ROWS($A$9:A9))))}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]
Copy the formula down and across.