In reply to Ian Wakeling.

Yes! I originally had a paragraph about the SPARSE function, but removed it because, as you say, zero cells in the matrix are not included in the "long form." However, for matrices without zeros, the SPARSE function provides a built-in alternative.