Aladin Akyurek said:
nikonlubber2003 said:
Range could be A1 to I20.
...
See the next post for processing.
Processing
As the exhibit shows, the processing area is next to data for easier exposition...
Formulas...
K3:
=MIN(A2:I21)
K4:
=MAX(A2:I21)
L4, copied down:
=IF(ROW()-ROW(L$4)+1<=$K$4-$K$3+1,ROW()-ROW(L$4)+$K$3,"")
M4, copied down:
=IF(ISNUMBER(L4),COUNTIF($A$2:$I$21,L4),"")
N4, copied down:
=IF(N(M4),RANK(M4,$M$4:$M$19)+COUNTIF($M$4:M4,M4)-1,"")
O1: 4 [ meaning: 4 most frequent ]
O2:
=MAX(IF(INDEX(M4:M19,MATCH(O1,N4:N19,0))=M4:M19,N4:N19))-O1
which must be confirmed with control+shift+enter instead of the usual enter.
O4, copied down:
=IF(ROW()-ROW(O$4)+1<=$O$1+$O$2,INDEX($L$4:$L$19,MATCH(ROW()-ROW(O$4)+1,$N$4:$N$19,0)),"")