View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel.misc
Dana DeLouis Dana DeLouis is offline
external usenet poster
 
Posts: 947
Default Which function? Biggest distance to the Nearest city ...

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

Hi. I always mess up the relative references in a 2-d table.
To help me, I select each of the 2 Columns and give it a name. Same for
each of the two Rows.
Therefore, the equation stays the same throughout the table. Helps me
anyway.

=SUMSQ(x_2-x_1,y_2-y_1)^0.5

--
Dana DeLouis


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
"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