title: constructing a matrix in excel vba
body: <p>I need help in constructing a n x n matrix, where n is equal to the number of remaining stocks at time t for t = 0, ..., 10. Initially, I have in total 10 stocks, which I will discard one by one as time goes by.</p>
  
  <p>Each element of the matrix will be equal to sigma(i) x sigma (j) x rho , where sigma(i)=sigma(j) = 0.25 and rho=0.2</p>
  
  <p>And the last thing I want to do is to multiply that matrix by the transpose of that matrix </p>
  
  <p>I am really confused where and how to start, and really thankful for your help </p>
  
  <pre><code>Sub Matrix() 
  'Sigmai 'Sigmaj 'Rho 
      Dim Sigmai, Sigmaj, Rho As Single 
      Sigmai = Range("b12").Value 
      Sigmaj = Range("b13").Value 
      Rho = Range("b14").Value 
      Dim matrixelement(10, 10) As Single 
      For n = 1 To 10 
          For m = 1 To 10 
              matrixelement(n, m) = Sigmai * Sigmaj * Rho 
              Cells(n, m) = matrixelement(n, m) 
          Next m 
      Next n 
  End Sub 
  </code></pre>