View Single Post
  #3   Report Post  
Alan Beban
 
Posts: n/a
Default

Mike wrote:
Appreciate any tips on doing the following matrix change:

Original Matrix
Date Series 1 Series 2 Series 3
1/1/2005 23 45 99
1/2/2005 24 46 100
1/3/2005 20 40 101
1/4/2005 22 40 99
1/5/2005 25 46 98

New Matrix
Date Series Data
1/1/2005 Series 1 23
1/2/2005 Series 1 24
1/3/2005 Series 1 20
1/4/2005 Series 1 22
1/5/2005 Series 1 25
1/1/2005 Series 2 45
1/2/2005 Series 2 46
1/3/2005 Series 2 40
1/4/2005 Series 2 40
1/5/2005 Series 2 46
1/1/2005 Series 3 99
1/2/2005 Series 3 100
1/3/2005 Series 3 101
1/4/2005 Series 3 99
1/5/2005 Series 3 98

Thanks in advance. Mike


If the functions in the freely downloadable file at
http:/home.pacbell.net/beban are available to your workbook, then
assuming your data, including headings, begins in Cell A1, enter in F1,
G1 and H1 Date, Series, Data, respectively, and then enter in F2, G2,
and H2 the following formulas and fill down as far as required:

=OFFSET($A$2,ROW(A1)-1-INT((ROW(A1)-1)/(COUNTA(A:A)-1))*(COUNTA(A:A)-1),0)

="Series "&INT((ROW(A1)-1)/(COUNTA(A:A)-1))+1

=INDEX(ArrayReshape(B$2:D$6,3*(COUNTA(A:A)-1),1,TRUE),ROW(A1))

Alan Beban