in a1= student name,b1= student scor
a2:a100.value = jack2..until jack100 ,in b2:b100.value = 100,80,90 ....until range(b100)
i want copy by criteria in col B 3 top skor (first scor,second scor,third scor) to column(d)..it is posible if use vba array
sub tes ()
dim y(),a,i&,j&,k&
with [a1].currentregion
a=.value
for i = 1 to ubound(a(i,1)
for j = 1 to 3
if worksheetFunction.large(a(i,2)),j then
k =k 1
y(k,1)= a(i,1)
y(k,2)=a(i,2)
end if
next j
next i
.columns(4).resize(,2) = y()
end sub
how to apply worksheetFunction.large to array
Bookmarks