Compare 2 cells MID unknown location

poikl

Active Member
Joined
Jun 8, 2002
Messages
484
Platform
  1. Windows
Hi, Can you please help me structure my Conditional Format? I have (with MREXCEL's help, Marcelo)-OR(MID(G2,5,3)=LEFT(H2,3),MID(G2,5,3)=LEFT(I2,3),MID(G2,5,3)=LEFT(J2,3),MID(G2,5,3)=LEFT(K2,3)).
The problem is though that ColG source is from Manual entry where operators enter name, sometimes with Prefix "Mr.", "Mrs.", "Dr." or even "Doctor" and other times with minor misspellings. I'm trying to compare those names to various Customer Data Base, ColH, thru ColK. (That's why I created the "MID" function but as you see it won't catch all probable variations)
Is there a way to include in MID "seemingly alike" entries which may start not necessarily in position 5, but maybe 4, 6 or 7?
 
but I'm stumped why it doesn't recognize the following (2), G2-BELL H2-Bell Materials and similarly G2-V.TANE H2-V. Tane
as a match???

Hi, the first example is only 4 characters long and you said that 5 consecutive characters need to match.

I think this slight amendment handles where the entire text is less than 5 characters:

Code:
=ISNUMBER(LOOKUP(1,-SEARCH(MID(G2,ROW(INDIRECT("1:"&MAX(1,LEN(G2)-4))),5),"|"&H2&"|"&I2&"|"&J2&"|")))

The second example does not fit the specification, i.e. there are not 5 consecutive characters that match (note the space after the "V." in the H2 value).
 
Upvote 0

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

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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