I am trying to use excel to calculate the distance between two points with x,y and z coordinates using the formula distance=SQRT((X1-X2)^2+(Y1-Y2)^2+(Z1-Z2)^2)). The formula works just fine for single calculations my problem lies in my ability to apply this formula to a large table similar to the attached image. (The diagonal should equal zero)

Example of the table I have and the table I want to make:

[![enter image description here](https://i.stack.imgur.com/HUq5g.png)](https://i.stack.imgur.com/HUq5g.png)

Is it possible to do this in excel? Any insight would be appreciated. Thanks, Derrick