Identifying close (not exact) matches from two columns

fauxlidae

New Member
Joined
Sep 21, 2023
Messages
8
Office Version
  1. 365
Platform
  1. Windows
I'm trying to create something that will identify a a 10 character sequence within a group of other characters in the same cell, compare it with a set of similar data in an adjacent column, and identify whether that same 10 character sequence appears anywhere in the second column.

1697214299556.png


The cells that may contain matching references are not typically in adjacent cells, only adjacent columns, and the data can be thousands of rows long.

The characters that must be matched will always be 10 adjacent characters, but the text they are within is not always the same length, not is the positioning within it the same.

Any help much appreciated!
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
1235.xlsm
ABC
1Data1Data2Result
21234512345TRUE
3222222FALSE
4AAABBBBBCBBBBBQQQQQQTRUE
52565635789642.00AAA56357DFGHTRUE
Sheet2
Cell Formulas
RangeFormula
C2:C5C2=IF(SUMPRODUCT(--(ISNUMBER(SEARCH(MID(A2, ROW(INDIRECT("1:" & LEN(A2)-4)), 5), B2))))>0, TRUE, FALSE)


You Just Change 5 to 10 in formula or change number according to your criteria
 
Upvote 0
1235.xlsm
ABC
1Data1Data2Result
21234512345TRUE
3222222FALSE
4AAABBBBBCBBBBBQQQQQQTRUE
52565635789642.00AAA56357DFGHTRUE
Sheet2
Cell Formulas
RangeFormula
C2:C5C2=IF(SUMPRODUCT(--(ISNUMBER(SEARCH(MID(A2, ROW(INDIRECT("1:" & LEN(A2)-4)), 5), B2))))>0, TRUE, FALSE)


You Just Change 5 to 10 in formula or change number according to your criteria
Thank you!!

It looks like the info needs to be in the adjacent cell at the moment - do you know of a way for it to scan the entire column for a match to a cell?

1697279756390.png


Tried adapting to =IF(SUMPRODUCT(--(ISNUMBER(SEARCH(MID(A:A, ROW(INDIRECT("1:" & LEN(A2)-4)), 5), B:B))))>0, TRUE, FALSE) with no luck.

Many thanks!
 
Upvote 0
I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with. ;)

See if this does what you want.

fauxlidae.xlsm
ABC
1
2zaed1234567898refijuhygtf1234567898trefTRUE
3lkjuhsnttttt56723kflsdrefsnttttt56723teTRUE
4restluckyshot546156478uytgfrtTRUE
5abcdefghijklmnoturmoilluckyshot57689564FALSE
6iuiwhejwqektree52134stonetree52134s472TRUE
Sheet1
Cell Formulas
RangeFormula
C2:C6C2=COUNT(MATCH("*"&MID(A2,SEQUENCE(LEN(A2)-9),10)&"*",B:B,0))>0
 
Upvote 0
I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with. ;)

See if this does what you want.

fauxlidae.xlsm
ABC
1
2zaed1234567898refijuhygtf1234567898trefTRUE
3lkjuhsnttttt56723kflsdrefsnttttt56723teTRUE
4restluckyshot546156478uytgfrtTRUE
5abcdefghijklmnoturmoilluckyshot57689564FALSE
6iuiwhejwqektree52134stonetree52134s472TRUE
Sheet1
Cell Formulas
RangeFormula
C2:C6C2=COUNT(MATCH("*"&MID(A2,SEQUENCE(LEN(A2)-9),10)&"*",B:B,0))>0
Oh that generator is so muhc easier lol, thank you!

Getting a #NAME? error from this formula sadly - any ideas?
 
Upvote 0
Getting a #NAME? error from this formula sadly - any ideas?
Your profile shows that you are using MS365.

1697281627132.png


Is that still correct? #NAME? error indicates that you may be using an older version?
 
Upvote 0

Forum statistics

Threads
1,215,076
Messages
6,122,988
Members
449,093
Latest member
Mr Hughes

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