VLOOKUP in 2 fields of numbers

Richolds

New Member
Joined
May 15, 2012
Messages
6
I have been looking through a lot of very similar threads on this particular subject but have thus far been unable to find a solution that works for me. I imagine that there is something on these forums that would work but I figured it couldn't really hurt to try posting my own thread.

I have 2 separate tables of data, one of them is static and is being used for a reference. Specifically these are fixed locations along a road for utility poles.The second table is data that is being collected for events that happen along a road.

I want to use the functionality of VLOOKUP because it will look for values close to the one being searched for and I won't necessarily get exact hits on the gps location. I would like my spreadsheet to display the closest pole to the location at which the event occurs.

For reference I am using Excel 2003 and I apologize in advance for my data format but I don't have administrator rights at work to install excel jeanie.

Event Occurences

Hit 40.2356 -62.3231 #CLOSESTPOLE
Hit 40.1231 -62.3311 #CLOSESTPOLE
Hit 40.2122 -61.895 #CLOSESTPOLE
Hit 40.2356 -61.532 #CLOSESTPOLE

Pole Locations
P121 40.2222 -62.3221
P122 40.1334 -61.7214
P123 40.2432 -62.4312

Obviously the actual tables are much larger than that but I am looking for the function that will take the locations of the occurence and replace #CLOSESTPOLE with the P12X number from the second table.

Sorry if this is at all unclear but any help that you can offer would be greatly appreciated!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
I have been looking through a lot of very similar threads on this particular subject but have thus far been unable to find a solution that works for me. I imagine that there is something on these forums that would work but I figured it couldn't really hurt to try posting my own thread.

I have 2 separate tables of data, one of them is static and is being used for a reference. Specifically these are fixed locations along a road for utility poles.The second table is data that is being collected for events that happen along a road.

I want to use the functionality of VLOOKUP because it will look for values close to the one being searched for and I won't necessarily get exact hits on the gps location. I would like my spreadsheet to display the closest pole to the location at which the event occurs.

For reference I am using Excel 2003 and I apologize in advance for my data format but I don't have administrator rights at work to install excel jeanie.

Event Occurences

Hit 40.2356 -62.3231 #CLOSESTPOLE
Hit 40.1231 -62.3311 #CLOSESTPOLE
Hit 40.2122 -61.895 #CLOSESTPOLE
Hit 40.2356 -61.532 #CLOSESTPOLE

Pole Locations
P121 40.2222 -62.3221
P122 40.1334 -61.7214
P123 40.2432 -62.4312

Obviously the actual tables are much larger than that but I am looking for the function that will take the locations of the occurence and replace #CLOSESTPOLE with the P12X number from the second table.

Sorry if this is at all unclear but any help that you can offer would be greatly appreciated!
Is this all in one cell: 40.2356 -62.3231
 
Upvote 0
No separate cells. I could make it one cell if you think that would be the right way to go, but I was under the impression that if I treated the numbers as text then I wouldn't be able to look for numbers close to the one I'm referencing.
 
Upvote 0
No separate cells. I could make it one cell if you think that would be the right way to go, but I was under the impression that if I treated the numbers as text then I wouldn't be able to look for numbers close to the one I'm referencing.
Ok, if those numbers are in 2 cells then which one are you wanting to lookup?

Book1
ABC
2Hit40.2356-62.3231
3Hit40.1231-62.3311
4Hit40.2122-61.895
5Hit40.2356-61.532
6___
7___
8___
9___
10P12140.2222-62.3221
11P12240.1334-61.7214
12P12340.2432-62.4312
Sheet1
 
Upvote 0
I want to be able to check both, one is a lattitude coordinate and one is a longitude coordinate. I want to be able to find the closest pole to the GPS coordinates that the event returns.

That's the problem I have, if all the events occured at the same of either one I would be all set, unfortunately those **** engineers couldn't even draw a straight line.

Thanks for the quick responses by the way I really appreciate it.
 
Upvote 0
With reference to the table you posted by the way, the field I would be trying to populate would be column D with the pole number taken from the lower section of column A.

So for example in D2 I would want P123 to appear to the user.
 
Upvote 0
With reference to the table you posted by the way, the field I would be trying to populate would be column D with the pole number taken from the lower section of column A.

So for example in D2 I would want P123 to appear to the user.
Hmmm...

I'm not sure how to do this when considering BOTH numbers. I'm sure there is some way to do it but I'm afraid I don't know how to do it! :eek:

I'll keep an eye on this thread so that if someone posts a solution I'll be able to learn something.

Good luck!
 
Upvote 0
Thank you.

I've been thinking about it and I know you can convert 2 points of lattitude and longitude into a distance between them, but I'm not sure if that would be useful or not, given that the MIN function can only look at 30 values (if I'm reading the help file correctly). Even if I were able to make use of this situation I imagine it would be ludicrously inefficient as far as finding the right pole when I enter new data points.
 
Upvote 0
Thank you.

I've been thinking about it and I know you can convert 2 points of lattitude and longitude into a distance between them, but I'm not sure if that would be useful or not, given that the MIN function can only look at 30 values (if I'm reading the help file correctly). Even if I were able to make use of this situation I imagine it would be ludicrously inefficient as far as finding the right pole when I enter new data points.
I'm thinking there must be some trig function that can do this but I'm not familar with the method.
 
Upvote 0

Forum statistics

Threads
1,215,062
Messages
6,122,923
Members
449,094
Latest member
teemeren

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