Multiple If And Statements for a Range of Values

Mr. Excel Wannabe

New Member
Joined
Mar 29, 2006
Messages
11
Hi All,

I have thousands of rows of lat/long coordinates for different pickup and drop off locations for Uber. The problem I am encountering is that some locations, like the Amazon fulfillment center or a large Park & Ride, have multiple lat/long coordinates. I need a formula that looks for the specific coordinates within the lat/long range and returns the location such as Amazon or Park & Ride. I came up with this formula, but it doesn't seem to work. It's only returning FALSE. Any help is appreciated!

Pickup LocationPickup LatitudePickup LongitudeDrop-off LocationDrop Off LatitudeDrop Off Longitude
FALSE​
30.448​
-97.63​
30.447​
-97.651​
FALSE​
30.467​
-97.621​
30.419​
-97.668​
FALSE​
30.463​
-97.582​
30.439​
-97.619​
FALSE​
30.44​
-97.62​
30.463​
-97.582​
FALSE​
30.447​
-97.651​
30.448​
-97.63​
FALSE​
30.469​
-97.626​
30.435​
-97.647​
FALSE​
30.454​
-97.625​
30.431​
-97.598​
FALSE​
30.453​
-97.606​
30.454​
-97.625​
FALSE​
30.419​
-97.669​
30.446​
-97.622​
FALSE​
30.432​
-97.6​
30.454​
-97.625​
FALSE​
30.441​
-97.606​
30.419​
-97.669​

=IF(AND(U2>=30.417,U2<=30.42),IF(AND(V2>=97.667,V2<=97.669),"Park & Ride",IF(AND(U2>=30.429,U2<=30.434),IF(AND(V2>=97.597,V2<=97.601),"Amazon","--"))))
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
I forgot to add the - signs to the formula, but it still doesn't change the outcome.

=IF(AND(X2>=30.417,X2<=30.42),IF(AND(Y2>=-97.667,Y2<=-97.669),"Park & Ride",IF(AND(X2>=30.429,X2<=30.434),IF(AND(Y2>=-97.597,Y2<=-97.601),"Amazon","--"))))
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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