Hi,
I have been trying to Redim a matrix by multiplying the rows by 2 and preserve the data.
The idea is to arrange the values in the following format.
From Matrix 1

Member ID 
Start Node 
End Node 
Matrix 1= 
A 
1 
2 

B 
3 
4 

C 
5 
6 
To Matrix 2

Member ID 
Nodes 
Load Case 
Matrix 2= 
A 
1 
1 

A 
2 
1 

A 
1 
2 

A 
2 
2 

B 
3 
1 

B 
4 
1 

B 
3 
2 

B 
4 
2 

C 
5 
1 

C 
6 
1 

C 
5 
2 

C 
6 
2 
The code is something like this.
Dim Matrix1(Rows1,Cols1) As Integer
Dim Matrix2(Rows2,Cols1) As Integer
'Matrix 1
For i = 1 to Rows1
For j = 1 to Cols1
Matrix1(i,j) = Worsheets.Cells(i,j).Value
Next j
Next i
Load Cases = 2
NumberOfNodes = 2
Rows2 = Load Cases*NumberOfNodes*Rows1
'Matrix 2
For i = 1 to Rows2 Step 2
For j = 1 to Cols1
Matrix2(i,j) = Matrix1(i,2).Value
Matrix2(i+1,j) = Matrix1(i,3).Value
Next j
Next i
Please let me know if you need more information.
My email is taitobass@hotmail.com
Thanks