Referring to the Wikipedia Example, we can use the formulas below to calculate the degrees of freedom (ν), Spearman rank correlation coefficient (ρ) and p-Value (using t-distribution).
x y
106 7
86 0
100 27
101 50
99 28
103 29
97 20
113 12
112 6
110 17
ν 8 =COUNT(x)-2
ρ -0.175757576 =CORREL(RANK.AVG(x,x,1),RANK.AVG(y,y,1))
Pval 0.686405828 =T.DIST(SQRT(ν*ρ^2/(1-ρ^2)),ν,1)
In the formulas above Defined Names have been used in place of cell references. Relative to A1
the references are: x=A2:A11, y=B2:B11, ν=B13, ρ=B14
. (greek letters can be used via Insert > Symbol)
Note: This assumes Excel 2010/13 for the RANK.AVG / T.DIST functions (use rank_avg / t_dist in VBA)