
Signature
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email
Bernard Liengme wrote...
>I would take each town and for every other town commute
>SUM(ABS(diff_in_parm)) for all parms. Then for find which other town has the
>lowest value for this statistic.
>Unfortunately you would have 100! pairs to look at. This is about 10^158
>which is possibly more than all the grains of sand on earth. If you compared
>1 million in a second it would take about 8 universe-life-times.
...
So don't compare them pairwise. If the 12 variables were denoted by
letters A to L, and the order of importance were G, E, C, A, B, D, F,
H, J, L, K, I, create a sort key by translating each variable to a
numeric 0-1 scale (e.g., x' = (x-MIN(xRng))/(MAX(xRng)-MIN(xRng))),
then concatenate their text representations as
=TEXT(g',"0.000")&TEXT(e',"0.000")&...&TEXT(i',"0.000")
This assumes that differences in variables are hierarchical, so that 2
records would be close if their G varaibles were close even if all
their other varaibles were far apart.
As for the OP's data, the OP is looking for the town closest to Town1,
and if there were N towns in the list, that requires only N-1
comparisons, and the entire list could be sorted by closeness to Town1.
And if the varaibles for Town1 and Town99 were in C2:N2 and C100:N100,
respectively, it may be more appropriate to use
=SUMXMY2(C$2:N$2,C$99:N$99)