Spreadsheet: 841033d1693295777-unable-to-use-vlookup-or-function-to-match-two-data-set-mid-function
Sheet: TST

CODE | LEN | MID Function |  | Given
SYD NZ AKL |  |  |  | Column A has over 100,000 rows, with various  characters length
DEL AI SYD 1A |  |  |  | Column  B has LEN function for A rows
MEL UL CMB UL MEL |  |  |  | Column C has MID function for Column A, for  corresponding Column B len function
SYD UL CMB//SYD 1A |  |  |  | Range B2:C52 is absolute reference
MXP VY BCN // VY IBZ
DEL UL CMB UL SYD 1A |  |  |  | Objective:
DXB EK MED//JED EK DXB |  |  |  | Function that will give result in Column C after matching Col. A and B data, Get 3 charters out from text string.
MEL UL CMB UL SIN UL MEL
DEL TG BKK TG MEL//SYD 1A
[NAME] // [NAME]
CMB QF SIN QF SYD QF ASP 1A
[NAME] BKK TG NRT//CTS TG BKK
CMB UL MEL YY HAVE A SAFE TRIP |  |  |  | Example
SYD LA SCL LA EZE LA SCL LA SYD |  |  |  | Text-String  in Cell-A2 length has 10 characters (Col. B); then Cell C2 function is MID(A2,8,3) result is AKL
MAA DL CDG DL YYZ WS YYC//DTW 1A |  |  |  | For any [NAME] Text that has length 10, MID(A2,8,3) iss function
SYD QF LHR QF SIN 3K HKT // QF SYD |  |  |  | Cell-A12 length has 28 characters, then Cell C12 function is MID(A2,15,3) result is SYD
SYD EK DXB EK MLA//ATH EK DXB EK SYD |  |  |  | For any [NAME] Text that has length 28, MID(A2,15,3) is function
DXB BI BWN BI [NAME] HAVE A SAFE TRIP
OOL VA MEL QR DOH QR IKA QR DOH QR MEL
MEL UL CMB UL LHE UL CMB UL MEL//SYD 1A
SYD CI TPE//TSA CI HND//NRT CI TPE CI SYD
SYD UL MEL UL CMB UL LHE UL CMB UL SYD 1A
SYD JL HND JL HEL AY AMS//CDG JL HND JL SYD
MKY QF BNE QF SIN AI DEL QF MEL QF BNE QF MKY
JNB 4Z HDS//MQP 4Z LVI//VFA 4Z CPT//PLZ 4Z JNB
SYD QF DFW QF BWI//JFK BA [NAME] OSL//LHR BA SYD
[NAME] OD KUL WY MCT WY JED//MED WY MCT WY KUL OD MEL
MEL BI BWN BI DXB BI BWN BI [NAME] HAVE A SAFE TRIP
CBR QF MEL QF SIN EK DXB EK LIS EK DXB EK MEL EK CBR
[NAME] ISB//KHI EK DXB [NAME]
SYD TK SIN TK IST TK ZAG OU SPU//ZAG TK IST TK SIN TK SYD
ADL VA SYD AC YVR AC YYZ AC YQM AC YYZ AC YVR AC SYD VA ADL
SYD QF HND//NRT LX ZRH LX MAD//LIS [NAME] EWR//JFK QF SYD
SYD QF [NAME] FRA LH SVQ//TLV [NAME] LX NRT//HND QF SYD QF PER
SYD LH SIN LH FRA LH VNO//TLL LH [NAME] CAI LH FRA LH SIN SQ SYD
MKY VA BNE UA SYD UA IAH UA LIM UA IAH UA LAX UA SYD VA BNE VA MKY
ADL EK MEL EK DXB EK NJF//MHD EK DXB EK MED//JED EK DXB [NAME]
PER UL SIN UL CMB UL KHI UL CMB UL SIN UL PER//MEL YY HAVE A SAFE TRIP
BWT QF MEL FJ NAN FJ TRW FJ NAN//SUV FJ FUN FJ SUV FJ NAN FJ MEL QF BWT
MEL QF SIN ET ADD ET JED ET ADD ET ASM ET ADD ET NBO ET ADD ET KUL MH MEL
SYD QF SIN MH KUL MH NRT JL HKG CX TLV//AMS AA PHL AA DCA AS SFO//LAX QF SYD
CBR QF SYD QF LAX QF ORD QF YYZ//JFK AY HEL AY PRG AY HEL AY SIN QF MEL QF CBR
SYD QF SIN MH KUL MH MAA//DEL QR DOH QR BER//AMS AA PHL AA DCA//PHL QF LAX QF SYD
MCY QF SYD QF SIN MH KUL MH NRT JL HKG CX TLV//AMS AA PHL AA DCA AS SFO//LAX QF BNE
PER QF SIN QF LHR//CDG AA DFW AA AUS AA RDU AA JFK AA LAX BA NAN FJ CHC QF MEL QF PER
WGA QF SYD QF SIN MH KUL MH MAA//DEL QR DOH QR BER//AMS AA PHL AA DCA//DFW QF SYD QF WGA
ADL UA MEL UA SFO UA MSY UA IAH UA FLL//MIA UA EWR UA LHR//MAN SQ SIN SQ HKT SQ SIN SQ ADL
PER QF SIN MH KUL MH MAA//DEL QR DOH QR BER//AMS AA PHL AA DCA//PHL AA YYZ//SFO QF SYD QF PER
NRT JL SIN MH KUL MH MAA//DEL QR DOH QR BER//AMS AA PHL AA DCA//PHL AA PHX AA SMF JL LAX JL HND
AKL QF SYD QF SIN MH KUL MH NRT JL HKG CX TLV//AMS AA PHL AA DCA//FAT AA PHX AA LAX QF MEL QF AKL
HBA QF SYD QF SIN MH KUL MH NRT JL HKG CX TLV//AMS AA PHL AA DCA AS SFO//FAT AA PHX AA LAX QF SYD QF