Years ago I got this from Alan Beban:
the following seems to work for a range named "rng1"; just enter it in a
cell and fill down.
=INDEX(rng1,ROW(A1)-MOD(ROW(A1)-1,COLUMNS(rng1))-((COLUMNS(rng1)-1)*(ROW(A1)-MOD(ROW(A1)-1,COLUMNS(rng1)))-(COLUMNS(rng1)-1))/COLUMNS(rng1),MOD(ROW(A1)-1,COLUMNS(rng1))+1)
Works like a charm.
Jack Sons
The Netherlands