postcode-outcodes DCJ.xlsx | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | |||
1 | Aaron | Ben | Chris | Darlene | Emma | Fred | Harriett | Imogen | Postcode | Closest | Furthest | |||||||||||
2 | id | postcode | latitude | longitude | B90 | NG34 | NE25 | DA1 | E16 | NR32 | NR7 | CM1 | Example> | CV3 | Aaron | Ben | Emma | Imogen | Darlene | |||
3 | 1 | B34 | 52.49641 | -1.7817 | 6.986994 | 67.23337 | 177.0118 | 111.4868 | 102.8162 | 147.7919 | 131.3371 | 108.2077 | Ouput | |||||||||
4 | 2 | IP10 | 52.01898 | 1.26999 | 133.6865 | 96.809 | 238.2241 | 60.12945 | 63.64208 | 37.9371 | 43.30831 | 39.41967 | ||||||||||
5 | 3 | G2 | 55.86291 | -4.25616 | 258.7406 | 252.0909 | 122.0045 | 355.4971 | 347.967 | 335.882 | 316.7066 | 343.182 | ||||||||||
6 | 4 | GL19 | 51.94616 | -2.29097 | 36.97394 | 107.473 | 217.1408 | 112.4756 | 103.7455 | 174.3554 | 160.6833 | 118.134 | ||||||||||
7 | 5 | L36 | 53.41441 | -2.84173 | 81.93906 | 105.5267 | 125.6624 | 187.007 | 178.6091 | 200.7798 | 181.5612 | 180.1643 | ||||||||||
8 | 6 | NE32 | 54.96779 | -1.48449 | 178.0475 | 143.8501 | 5.846014 | 253.084 | 246.9311 | 215.8301 | 197.5023 | 236.5178 | ||||||||||
9 | 7 | L12 | 53.43498 | -2.8958 | 84.32286 | 108.0513 | 125.3511 | 189.5839 | 181.1765 | 203.3219 | 184.0859 | 182.7921 | ||||||||||
10 | 8 | NR28 | 52.82243 | 1.397492 | 138.3708 | 75.51502 | 193.6905 | 107.4987 | 107.6084 | 26.91793 | 12.56188 | 84.27391 | ||||||||||
11 | 9 | SO21 | 51.07538 | -1.31624 | 94.02331 | 137.7933 | 274.893 | 70.81692 | 65.44297 | 162.842 | 156.7226 | 89.42612 | ||||||||||
12 | 10 | CV3 | 52.39098 | -1.47814 | 14.68171 | 61.3129 | 183.895 | 97.03765 | 88.4283 | 135.3574 | 119.6229 | 93.50113 | ||||||||||
Sheet1 |
Using a half-postcode as a reference, I would like to look up that postcode in column B and find the 5 lowest numbers in that row in the array F3:M12 and put them in order from lowest to largest. I would then like to use those numbers to reference the names in F1 to M1, so instead of outputting a list of numbers it would instead output the names effectively showing the 5 closest people to that postcode, example shown in O:T using CV3 as the reference postcode.
I already have formulas for figuring out the distances so that is not relevant, thanks for any help.