stuckinthemiddle
New Member
- Joined
- May 22, 2005
- Messages
- 8
This need to be written in vba as speed is essential.
This is what I am trying to achieve. I wish to start at the top row of data and loop through the data from row 2 to row end of data, you will see on the spreadsheet that I have highlighted 2 matrices. Now here comes the tricky bit for me, I wish to insert data into 2 matrices, the matrices I have shown are 3dimensional for ease however this changes for each pass that I do and eventually the last pass has 8 dimensions all matrices are square so as you can see we start with 3X3 and end with 8X8. This mean that the matrices cannot be fixed sizes hence some of the problem I have to deal with. Next as the data is inserted into each mtrix as shown each row of data has a multiplying factor which is shown in bold for each row of data. ie
I have used the actual cell reference for the data symbol
Matrix A
((I2) (J2) (k2))*H2
((M2) (N2) (O2))*L2
((Q2) (R2) (S2))*P2
Matrix B
((U2) (V2) (W2))*T2
((Y2) (Z2) (AA2))*X2
((AC2) (AD2) (AE2))*AB2
next I need to find the determinant for each matrix and then again multiply each determinant by a factor which is determined by a for next loop. I know that this is not a trivial task and I do hope that you can help I have enclosed some further notes below to help with the spreadsheet, if you need any further assistance please email me for clarification.
You will see that I have enclosed a spreadsheet to help you. At the top left you can see a comment box stating Matrix A, below in rows 2,3 and 4 are data. If you select each data cell there is a reference to the cell that the data is situated. I have formatted the cells appropriately for ease. You will also see that there is a similar Matrix,matrix B starting at rows 16,17 and 18.
Both of the Matrix data is from the first row(Row 2). The data is to be inserted into the matrix as shown and each row of data is to be multiplied by the data in the corresponding bold font for each row,ie row2 data in the matrix is to be multiplied by column H, row3 data by columnL and row4 data by column p. For matrix B you will see that I have placed a multiplication symbol(*) in column D and that in column E there is data, again if you select the cell you can see where the data is situated on the sheet and again the data in the matrix is to be multiplied by this data.
This is what I am trying to achieve. I wish to start at the top row of data and loop through the data from row 2 to row end of data, you will see on the spreadsheet that I have highlighted 2 matrices. Now here comes the tricky bit for me, I wish to insert data into 2 matrices, the matrices I have shown are 3dimensional for ease however this changes for each pass that I do and eventually the last pass has 8 dimensions all matrices are square so as you can see we start with 3X3 and end with 8X8. This mean that the matrices cannot be fixed sizes hence some of the problem I have to deal with. Next as the data is inserted into each mtrix as shown each row of data has a multiplying factor which is shown in bold for each row of data. ie
I have used the actual cell reference for the data symbol
Matrix A
((I2) (J2) (k2))*H2
((M2) (N2) (O2))*L2
((Q2) (R2) (S2))*P2
Matrix B
((U2) (V2) (W2))*T2
((Y2) (Z2) (AA2))*X2
((AC2) (AD2) (AE2))*AB2
next I need to find the determinant for each matrix and then again multiply each determinant by a factor which is determined by a for next loop. I know that this is not a trivial task and I do hope that you can help I have enclosed some further notes below to help with the spreadsheet, if you need any further assistance please email me for clarification.
You will see that I have enclosed a spreadsheet to help you. At the top left you can see a comment box stating Matrix A, below in rows 2,3 and 4 are data. If you select each data cell there is a reference to the cell that the data is situated. I have formatted the cells appropriately for ease. You will also see that there is a similar Matrix,matrix B starting at rows 16,17 and 18.
Both of the Matrix data is from the first row(Row 2). The data is to be inserted into the matrix as shown and each row of data is to be multiplied by the data in the corresponding bold font for each row,ie row2 data in the matrix is to be multiplied by column H, row3 data by columnL and row4 data by column p. For matrix B you will see that I have placed a multiplication symbol(*) in column D and that in column E there is data, again if you select the cell you can see where the data is situated on the sheet and again the data in the matrix is to be multiplied by this data.