to create rolling windows from a column

M

Moohwan

Please help me out.
For example, suppose I have a series below.
2
3
4
5
6
7
If I want to have 3-observation rolling windows, how could I accomplish the
task?
The outcome I want is as follws.
2 3 4 5
3 4 5 6
4 5 6 7

thanks in advance
 
S

Shane Devenshire

Hi,

Suppose your data is in A1:A6

then enter this formula in any cell and copy it down three rows and over 4
columns.

=OFFSET($A$1,ROW(A1)-1+COLUMN(A1)-1,)
 
Top