Dohhhh - Just realised in fact that the 300s in the original post should
have been 600s in order to give you a table 300 rows deep - apologies.
Anyway, fixed for this one, so again put it in B2 and then copy and paste to
a 300 row by x column range
=OFFSET($A$1,ROW()*5-5+((COLUMN()-2)*1500),0)&","&OFFSET($A$1,ROW()*5-4+((CO
LUMN()-2)*1500),0)&","&OFFSET($A$1,ROW()*5-3+((COLUMN()-2)*1500),0)&","&OFFS
ET($A$1,ROW()*5-2+((COLUMN()-2)*1500),0)&","&OFFSET($A$1,ROW()*5-1+((COLUMN(
)-2)*1500),0)
Basically the OFFSET function allows you to set an anchor cell and then grab
a value from another cell x rows and y columns away from that anchor cell (0
rows and 0 columns away would be the anchor cell itself). From there you
simply set A1 as the anchor cell and then use the ROW() function to try and
get a value x rows away. What you look to do in this one is to get the
value from 0 rows away, 1 row away, 2 rows away, 3 rows away and 4 rows away
(5 row range).
The ROW() function returns the row number of the row itself, so by using it
5 times in the same cell but making an adjustment each time with -5, -4, -3
etc you get the following:-
In any cell in row 1 ROW() gives you 1, so therefore
ROW()*5 = 5
so therefore
ROW()*5-5 = 0 (0 rows offset from A1 = A1)
ROW()*5-4 = 1 (1 rows offset from A1 = A2)
ROW()*5-3 = 2 (2 rows offset from A1 = A3)
ROW()*5-2 = 3 (3 rows offset from A1 = A4)
ROW()*5-1 = 4 (4 rows offset from A1 = A5) which has now pulled in all
the values from the cells A1:A5
and when you then copy this to the next cell in row 2, then
ROW()*5 = 10
so therefore
ROW()*5-5 = 5 (5 rows offset from A1 = A6)
ROW()*5-4 = 6 (6 rows offset from A1 = A7)
ROW()*5-3 = 7 (7 rows offset from A1 = A8)
ROW()*5-2 = 8 (8 rows offset from A1 = A9)
ROW()*5-1 = 9 (9 rows offset from A1 = A10) which has now pulled in all
the values from the cells A6:A10
and so on.
The same logic used with the COLUMN function allows me to restart the
numbering at whatever multiple I want. If you are combining 2 values a time
then obviously in 300 rows you will capture 600 values, or the values from
the first 600 rows. If you want to combine values from 5 cells a time then
in 300 rows you will cover 5*300 = 1500 values.
Hope this helps somewhat