Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default problem with creating a serie of matrixes

I would like to create a number of matrixes from a list (covariance between
assets over time). I put =MMULT(TRANSPOSE(O2:S25);O2:S25)/24 in excel and get
a 5x5 covariance matrix calculated on the dates 9301-9412. I would like new
matrix for every new months (moving one month at a time). The next would
refer to 9302-9501 or =MMULT(TRANSPOSE(O3:S26);O3:S26)/24 and so on. The
problem now is that I cannot simply copy the matrix below the previous one
because that one is five rows down and refer to the date 9306-9505.

I would be very thankful if some one knows how to do, maybe with a macro or
in some other way.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default problem with creating a serie of matrixes

On 8 jan, 18:50, Johannes wrote:
I would like to create a number of matrixes from a list (covariance between
assets over time). I put =MMULT(TRANSPOSE(O2:S25);O2:S25)/24 in excel and get
a 5x5 covariance matrix calculated on the dates 9301-9412. I would like new
matrix for every new months (moving one month at a time). The next would
refer to 9302-9501 or =MMULT(TRANSPOSE(O3:S26);O3:S26)/24 and so on. The
problem now is that I cannot simply copy the matrix below the previous one
because that one is five rows down and refer to the date 9306-9505.

I would be very thankful if some one knows how to do, maybe with a macro or
in some other way.


Hi Johannes,

In Excel 2003 I have created this macro:

Sub Johannes()
Dim lngRow As Long

' Position first result matrix
Range("B2").Select

lngRow = 2

Do
ActiveCell.Resize(5, 5).Select
Selection.FormulaArray = "=MMULT(TRANSPOSE(O" & _
lngRow & ":S" & (lngRow + 23) & "),O" & _
lngRow & ":S" & lngRow + 23 & ")/24"
lngRow = lngRow + 1
' Keep 2 rows between result matrixes
ActiveCell.Offset(7, 0).Select
Loop Until IsEmpty(Cells(lngRow + 23, 15))

End Sub

HTH,

Wouter
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum serie with condition an Excel Worksheet Functions 5 March 21st 08 08:03 PM
max data serie WG Charts and Charting in Excel 9 June 25th 07 03:19 PM
Format serie of numbers Norm Gregoire Excel Worksheet Functions 5 February 12th 07 04:18 PM
Storage of a serie of dates [email protected] Excel Programming 9 April 19th 06 03:11 PM
Second serie doesn't use X-as values JackRnl Charts and Charting in Excel 1 January 20th 05 01:04 AM


All times are GMT +1. The time now is 01:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"