title: Compute covariance matrix using Excel
body: <p>In Excel, I have 10 columns of data from column A to column J, and each column has 1000 rows from row 1 to row 1000. I wonder how to compute the 10 x 10 covariance matrix of the 10 columns of data in Excel? </p>
  
  <p>My partial solution is based on dollar signs and copying formulas:</p>
  
  <p>First I input in a cell a formula  <code>=covar($A1:$A1000,A1:A1000)</code>.</p>
  
  <p>Then I copy and paste the formula to the cells on the right of the first cell, which gives me <code>=covar($A1:$A1000,B1:B1000)</code> ... <code>=covar($A1:$A1000,J1:J1000)</code>. </p>
  
  <p>Now I don't know how I can get <code>=covar(B1:B1000,A1:A1000)</code> ... <code>=covar(J1:J1000,A1:A1000)</code>, because if I copy and paste the formula to the cells below the first cell, I will get <code>=covar($A2:$A1001,A2:A1001)</code>, ..., <code>=covar($A1000:$A2001,A1000:A2001)</code> instead. </p>
  
  <p>Thanks!</p>