Vlookup

Marie81

New Member
Joined
Aug 21, 2017
Messages
7
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Point[/TD]
[TD]Eastings[/TD]
[TD]Northings[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[TD]567768[/TD]
[TD]6376890[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2[/TD]
[TD]567702[/TD]
[TD]6376035[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]3[/TD]
[TD]567835[/TD]
[TD]6377836[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]4[/TD]
[TD]567936[/TD]
[TD]6376471[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]5[/TD]
[TD]568035[/TD]
[TD]6376044[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]6[/TD]
[TD]566834[/TD]
[TD]6377837[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]7[/TD]
[TD]567413[/TD]
[TD]6378635[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]8[/TD]
[TD]566036[/TD]
[TD]6378999[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]9[/TD]
[TD]568634[/TD]
[TD]6377941[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]10[/TD]
[TD]566345[/TD]
[TD]6376534[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD][/TD]
[TD]First Point[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD][/TD]
[TD]Second Point[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD][/TD]
[TD]Diff Easting[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]17[/TD]
[TD][/TD]
[TD]Diff Nothing[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]18[/TD]
[TD][/TD]
[TD]Distance[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[FONT=&quot]
Hi,[/FONT]

[FONT=&quot]
[/FONT]

[FONT=&quot]Can help me on this question.[/FONT]
[FONT=&quot]
[/FONT]

[FONT=&quot]I'm trying to use vlookup to calculate the distance between two points. [/FONT]
[FONT=&quot]I need to be able to choose any point I wish and type that into cell B14 (starting point). Then the same thing for the end [/FONT]
[FONT=&quot]point in cell B15. The difference between eastings and northings of both slected point will be display in cell B16 and B17.[/FONT]
[FONT=&quot]The distance between two points will be displayed in B18. Distance is =SQRT(B16^2+B17^2).[/FONT]
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hello,

If I understand correctly ...

in cell B16 =VLOOKUP(B15,$A$2:$C$11,2)-VLOOKUP(B14,$A$2:$C$11,2)

in cell B17 =VLOOKUP(B15,$A$2:$C$11,3)-VLOOKUP(B14,$A$2:$C$11,3)

HTH
 
Upvote 0
Does this work correctly?

Howard


Excel 2012
ABC
1PointEastingsNorthings
215677686376890
325677026376035
435678356377836
545679366376471
655680356376044
765668346377837
875674136378635
985660366378999
1095686346377941
11105663456376534
12
13
1410First Point
151Second Point
16-1423Diff Easting
17-356Diff Nothing
181466.85548Distance
Sheet1
Cell Formulas
RangeFormula
B16=VLOOKUP(B14,$A$2:$B$11,2,0)-VLOOKUP(B15,$A$2:$B$11,2,0)
B17=VLOOKUP(B14,$A$2:$C$11,3,0)-VLOOKUP(B15,$A$2:$C$11,3,0)
B18=SQRT(B16^2+B17^2)
 
Last edited:
Upvote 0
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Point[/TD]
[TD]Eastings[/TD]
[TD]Northings[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[TD]567768[/TD]
[TD]6376890[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2[/TD]
[TD]567702[/TD]
[TD]6376035[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]3[/TD]
[TD]567835[/TD]
[TD]6377836[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]4[/TD]
[TD]567936[/TD]
[TD]6376471[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]5[/TD]
[TD]568035[/TD]
[TD]6376044[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]6[/TD]
[TD]566834[/TD]
[TD]6377837[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]7[/TD]
[TD]567413[/TD]
[TD]6378635[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]8[/TD]
[TD]566036[/TD]
[TD]6378999[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]9[/TD]
[TD]568634[/TD]
[TD]6377941[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]10[/TD]
[TD]566345[/TD]
[TD]6376534[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD][/TD]
[TD]First Point[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD][/TD]
[TD]Second Point[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD][/TD]
[TD]Diff Easting[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]17[/TD]
[TD][/TD]
[TD]Diff Nothing[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]18[/TD]
[TD][/TD]
[TD]Distance[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Hi,



Can help me on this question.


I'm trying to use vlookup to calculate the distance between two points.
I need to be able to choose any point I wish and type that into cell B14 (starting point). Then the same thing for the end
point in cell B15. The difference between eastings and northings of both slected point will be display in cell B16 and B17.
The distance between two points will be displayed in B18. Distance is =SQRT(B16^2+B17^2).


*What should I put in cell B14 and B15, it still give #VALUE !
 
Upvote 0
Your question ...
What should I put in cell B14 and B15

In your first message ...
I need to be able to choose any point I wish and type that into cell B14 (starting point). Then the same thing for the end
point in cell B15
 
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,007
Members
452,374
Latest member
keccles

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