So I've run into a problem that I believe there is a solution for, however, I am not keen on how to implement the function.
In the chart below you'll notice that all of the FALSE returns highlighted are actually TRUE.
The code is as follows:
Range("AC2").Formula = "=IF(LEFT(K2,4)=LEFT(AB2,4),True,False)"
I'm pretty much just seeing if the first 4 letters of the USER DEFINED destination match the first 4 of the actual destination. What I need to be testing is: is "AA" contained in "AB".
I was told that I can use INSTR to get accurate results, but after looking at some examples, I don't see how declaring the "position" in which to start looking for a specific string like "Detroit" is going to help me.
It can't be this complicated; has to be simpler such as: IF "AB" contains "AA" then TRUE, if not FALSE
<tbody>
</tbody>
In the chart below you'll notice that all of the FALSE returns highlighted are actually TRUE.
The code is as follows:
Range("AC2").Formula = "=IF(LEFT(K2,4)=LEFT(AB2,4),True,False)"
I'm pretty much just seeing if the first 4 letters of the USER DEFINED destination match the first 4 of the actual destination. What I need to be testing is: is "AA" contained in "AB".
I was told that I can use INSTR to get accurate results, but after looking at some examples, I don't see how declaring the "position" in which to start looking for a specific string like "Detroit" is going to help me.
It can't be this complicated; has to be simpler such as: IF "AB" contains "AA" then TRUE, if not FALSE
Customer ID (Z) | User Defined Destination (AA) | Airport Code Destination (AB) | Dest. Match? (AC) |
DTW | DETROIT | Detroit, MI | TRUE |
SLC | SALT LAKE CITY | Salt Lake City, UT | TRUE |
MSP | SAINT PAUL | Minneapolis - St. Paul Int'l | FALSE |
MSP | MINNEAPOLIS | Minneapolis - St. Paul Int'l | TRUE |
HNL | HONOLULU | Honolulu, HI | TRUE |
SLC | SALT LAKE CITY, UT | Salt Lake City, UT | TRUE |
DTW | DETROIT | Detroit, MI | TRUE |
DTW | DETROIT | Detroit, MI | TRUE |
DTW | DETROIT | Detroit, MI | TRUE |
HNL | HONOLULU | Honolulu, HI | TRUE |
LAS | LAS VEGAS | Las Vegas, NV | TRUE |
EWR | NEWARK | New York - Newark, NJ | FALSE |
DTW | DETROIT | Detroit, MI | TRUE |
PHX | SKY HARBOR | Phoenix, AZ - Sky Harbor | FALSE |
ATL | ATLANTA | Atlanta, Hartsfield Atlanta | TRUE |
ATL | HARTFIELD | Atlanta, Hartsfield Atlanta | FALSE |
ATL | ATLANTA | Atlanta, Hartsfield Atlanta | TRUE |
ATL | ATLANTA | Atlanta, Hartsfield Atlanta | TRUE |
DTW | DETROIT | Detroit, MI | TRUE |
CLT | CHARLOTTE | Charlotte, NC | TRUE |
EWR | NEWARK | New York - Newark, NJ | FALSE |
<tbody>
</tbody>