Calculating distance using coordinates

bionic909

New Member
Joined
Mar 8, 2024
Messages
4
Office Version
  1. 2021
Platform
  1. MacOS
Hi, new here.
I’ve just seen a thread regarding getting a distance between two coordinates (eastings / Northings)

I was hoping someone on here would no a formula that will calculate a distance between a point (coordinate) and a line which has a coordinate at the start and finish (string line)

In short, I need a formula which will calculate the distance from a line determined by two coordinates (point A to point B) to another point (point C)

I have attached a diagram.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
The common geometrical method establishes the slope and intercept of the line and then uses the Pythagorean Theorem for computing the perpendicular distance between the point and line...shown here in B6.
Book1
ABCD
1 Line
2Point 1Point 2Point 3
3x132
4y261
5
6perp dist (d)1.341641
Sheet1
Cell Formulas
RangeFormula
B6B6=LET(Lxs,B3:C3,Lys,B4:C4,Px,D3,Py,D4,m,SLOPE(Lys,Lxs),b,INTERCEPT(Lys,Lxs),ABS(m*Px-Py+b)/SQRT(m^2+1))

1709917303461.png
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top