Hi,

I was wondering if someone would be able to help me.
I have data in two columns, sites in column A, and the slope for each site in column B

eg:

SITE slope
1 2
2 -2
3 4

(and so on for 20 sites)

I want to find all unique 2 site combinations of the sites in column A, without a site being compared with itself, and without repeats (ie, 1,2 would be a valid pairing, but 1,1 would not, and 2,1 would not as it repeats the same pairing as 1,2), and then have these combinations output as a list into a third column (say column D) in the format 1,2 (showing in this case a pairing of site 1 and 2).

Furthermore, I then want a fourth column to be generated which gives the difference between the slopes which are associated with the sites in each pair, but ensuring this is a positive value (ie for the pairing of site 1 and site 2 described above, the slope difference is 4, and this would be output in the column E alongside the column D entry that tells me which sites this difference value relates to, in this case 1,2).

Does anybody know how I would go about doing this?

Thanks,

Paul