View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel.misc
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Which function? Biggest distance to the Nearest city ...

"Pete_UK" wrote in message
ups.com...
Carrying on with your suggestion to use a 2-d table, with your data in
columns A, B and C starting on row 4 (insert blank rows above if
necessary), then <copy the data, click on D1 and use Edit | Paste
Special | Transpose (check) | OK then <Esc - this will give you a
copy of the towns and xy coordinates in the top 3 rows. Cell D4 will
thus represent the distance from town-1 to town-1, D5 from town-2 to
town-1 etc.

You can apply your formula to each cell, something like:

=(($B4-D$2)^2 +($C4-D$3)^2)^0.5

....

Or, if you prefer, =SQRT(SUMSQ($B4-D$2,$C4-D$3))
--
David Biddulph