title: Euclidean distance matrix in excel
body: <p>I'm in desperate need of some Excel related help.</p>
  
  <p>Let's say I have 4 different segments. Each segment has 7 numeric attributes.  </p>
  
  <pre><code>A(200;43;23;1.5;16;50000;14)  
  B(250;41;23;2.1;19;70000;13)  
  C(179;37;25;3.4;20;15000;12)  
  D(402;49;19;1.9;25;99000;11)
  </code></pre>
  
  <p>Let's say each segment has it's own row(1-4) and each attribute has its own column(A-G).
  I'm calculating the euclidean distance between each separate row by using this equation:  </p>
  
  <pre><code>=SQRT(SUMPRODUCT((A1:G1-B2:G2)^2))
  </code></pre>
  
  <p>How could I edit this equation so that if I created a matrix like this:  </p>
  
  <pre><code>\ A B C D  
  A  
  B  
  C  
  D  
  </code></pre>
  
  <p>There should be 0's on diagonals and distance between segments in the cells where given segments cross? Every time I use '$' to fix a row or column I get incorrect results and I have ran out of ideas.<br>
  I hope I expressed my problem so that everyone could understand.</p>