Formula needed that can find a value from a list and then check another cell for a certain letters?

danbates

Active Member
Joined
Oct 8, 2017
Messages
377
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I asked this question last year and I was given a solution to it but unfortunately now the previous solution is now no longer valid.

Here is my previous thread:

Now I need the formula to do the same but also be able to work the opposite way around. So if the 234 is above the 234 - GB (post 7)

Any questions then please ask and any help would be much appreciated.

Thanks

Dan
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Please provide an example of your data and the expected result.
Typically you would try to look for the more precise value first, in your case being code & " - " & country and if it can't find it just look for code.
I think that is what the formula you have does.
(Post #4 - =IFERROR(LOOKUP(2,1/FIND(B1&" - "&A1,A$9:A$13),B$9:B$13),LOOKUP(2,1/FIND(B1,A$9:A$13),B$9:B$13)) )

What is it that you want differently ? If you look for just the code first it will only look for the combined option if the code on its own doesn't exist in your table.
 
Upvote 0
The only thing that concerns me a little is the use of find (wildcard search) when just looking up the code, so in case that is your issue try the below.

20221025 Lookup Multi Criteria and alternate danbates.xlsm
ABCDEFGHI
1Data --->CodeCntryResultLookup -->CodeCntry
2234GB81261
3208XL5632
4144CN62163
5192GB9208 - GB4
6234MX72085
7208GB41446
8234GB82347
9208XR5234 - GB8
10126IL11929
11234IL7
12208GB4
13234FR7
Sheet1
Cell Formulas
RangeFormula
E2:E13E2=IFERROR(IFERROR(LOOKUP(2,1/(($H$2:$H$10)=(C2&" - "&D2)),$I$2:$I$10),VLOOKUP(C2,$H$2:$I$10,2,FALSE)),"Not Found")
 
Upvote 0

Forum statistics

Threads
1,214,982
Messages
6,122,581
Members
449,089
Latest member
Motoracer88

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