I have Latitude and longitudes for UPS stores. Column a has UPS store code, Column b is the latitudes, Column c is the longitude. I also have another list of latitude (column e) and longitudes (column f) for random Walmart locations. I need to find the nearest set of coordinates of the Walmart and ups stores for shortest driving distance
=INDEX($A3ドル:$A434,ドル MATCH(MIN(SQRT((E11-B3ドル:B434ドル)^2+(F11-C3ドル:C434ドル)^2)), SQRT((E11-B3ドル:B434ドル)^2+(F11-C3ドル:C434ドル)^2), 0))
I tried this formula (very popular when I search for the solution-however, it works on my small sample data (rows of 10)- However when I try it on the data I need (400+ rows), every single cell returns #VALUE!
Ron Rosenfeld
62.1k7 gold badges35 silver badges72 bronze badges
-
1Why should I not upload images of code/data/errors when asking a question?Ron Rosenfeld– Ron Rosenfeld2024年02月15日 20:45:02 +00:00Commented Feb 15, 2024 at 20:45
-
2Your formula will not provide driving distance.Ron Rosenfeld– Ron Rosenfeld2024年02月15日 20:51:03 +00:00Commented Feb 15, 2024 at 20:51
-
1Like Ron Rosenfeld commented: nearest location is not necessarily shortest driving distance, but most definately isn't equal to the distance.P.b– P.b2024年02月15日 21:44:23 +00:00Commented Feb 15, 2024 at 21:44
-
2I just tried your formula on 600 rows, and it worked perfectly. Without knowing your data we can't know why it doesn't work for you.Paul– Paul2024年02月16日 10:23:43 +00:00Commented Feb 16, 2024 at 10:23
-
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.Community– Community Bot2024年02月29日 08:46:30 +00:00Commented Feb 29, 2024 at 8:46