Hi,
This is the formula I am currently using in the top right most cell in the table below showing "Melbourne":
(Look at the 3rd column and see if it contains "MEL", if it does then return value in column 2)
=VLOOKUP(MID(D2,SEARCH("MEL",D2),3),$B$2:$C$9,2,FALSE)
(Lookup table is the first 2 columns, 3rd column is the value lookedup, 4th column contains the formula above):
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][TABLE="width: 615"]
<tbody>[TR="class: grid"]
[TD]ADL[/TD]
[TD]Adelaide[/TD]
[TD]zzzzzz_MEL_jjjjj_1000[/TD]
[TD]Melbourne[/TD]
[/TR]
[TR="class: grid"]
[TD]BNE[/TD]
[TD]Brisbane[/TD]
[TD]zzzzzz_MEL_jjjjj_1000[/TD]
[TD]Melbourne[/TD]
[/TR]
[TR="class: grid"]
[TD]CAIRNS[/TD]
[TD]Cairns[/TD]
[TD]zzzzzz_PER_jjjjj_1000[/TD]
[TD="align: center"]#VALUE![/TD]
[/TR]
[TR="class: grid"]
[TD]CBR[/TD]
[TD]Canberra[/TD]
[TD]zzzzzz_PER_jjjjj_1000[/TD]
[TD="align: center"]#VALUE![/TD]
[/TR]
[TR="class: grid"]
[TD]DRW[/TD]
[TD]Darwin[/TD]
[TD]zzzzzz_SYD_jjjjj_1000[/TD]
[TD="align: center"]#VALUE![/TD]
[/TR]
[TR="class: grid"]
[TD]MEL[/TD]
[TD]Melbourne[/TD]
[TD]zzzzzz_SYD_jjjjj_1000[/TD]
[TD="align: center"]#VALUE![/TD]
[/TR]
[TR="class: grid"]
[TD]PER[/TD]
[TD]Perth[/TD]
[TD]yyy_ADL_jjjjj_1000[/TD]
[TD="align: center"]#VALUE![/TD]
[/TR]
[TR="class: grid"]
[TD]SYD[/TD]
[TD]Sydney[/TD]
[TD]yyy_ADL_jjjjj_1000[/TD]
[TD="align: center"]#VALUE![/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
What I'd like to do is have the Search function include PER, SYD, etc. so that it will look up the rest of the cities, and not just MEL which is the current state of the formula.
Would anyone be able to help out here please?
This is the formula I am currently using in the top right most cell in the table below showing "Melbourne":
(Look at the 3rd column and see if it contains "MEL", if it does then return value in column 2)
=VLOOKUP(MID(D2,SEARCH("MEL",D2),3),$B$2:$C$9,2,FALSE)
(Lookup table is the first 2 columns, 3rd column is the value lookedup, 4th column contains the formula above):
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][TABLE="width: 615"]
<tbody>[TR="class: grid"]
[TD]ADL[/TD]
[TD]Adelaide[/TD]
[TD]zzzzzz_MEL_jjjjj_1000[/TD]
[TD]Melbourne[/TD]
[/TR]
[TR="class: grid"]
[TD]BNE[/TD]
[TD]Brisbane[/TD]
[TD]zzzzzz_MEL_jjjjj_1000[/TD]
[TD]Melbourne[/TD]
[/TR]
[TR="class: grid"]
[TD]CAIRNS[/TD]
[TD]Cairns[/TD]
[TD]zzzzzz_PER_jjjjj_1000[/TD]
[TD="align: center"]#VALUE![/TD]
[/TR]
[TR="class: grid"]
[TD]CBR[/TD]
[TD]Canberra[/TD]
[TD]zzzzzz_PER_jjjjj_1000[/TD]
[TD="align: center"]#VALUE![/TD]
[/TR]
[TR="class: grid"]
[TD]DRW[/TD]
[TD]Darwin[/TD]
[TD]zzzzzz_SYD_jjjjj_1000[/TD]
[TD="align: center"]#VALUE![/TD]
[/TR]
[TR="class: grid"]
[TD]MEL[/TD]
[TD]Melbourne[/TD]
[TD]zzzzzz_SYD_jjjjj_1000[/TD]
[TD="align: center"]#VALUE![/TD]
[/TR]
[TR="class: grid"]
[TD]PER[/TD]
[TD]Perth[/TD]
[TD]yyy_ADL_jjjjj_1000[/TD]
[TD="align: center"]#VALUE![/TD]
[/TR]
[TR="class: grid"]
[TD]SYD[/TD]
[TD]Sydney[/TD]
[TD]yyy_ADL_jjjjj_1000[/TD]
[TD="align: center"]#VALUE![/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
What I'd like to do is have the Search function include PER, SYD, etc. so that it will look up the rest of the cities, and not just MEL which is the current state of the formula.
Would anyone be able to help out here please?