I would like to find all matching pairs in the following example:

col
a b c d e f
a1 7 9 13 3 5 2
a2 3 6 11 2 8 5
a3 5 3 4 1 7 2

I can see for example that
3-2 in (a1) (a2) (a3)
7-5 in (a1) (a3)
3-5 in (a1) (a2) (a3)
and so on...

How can I set this up in excel?

Also, I am have a problem in sorting the rows from small to high
(a3) 5 3 4 1 7 2
to
(a3) 1 2 3 4 5 7

Can rows be sorted like columns?

Thanks ahead to all that helps me with this.

-dave